#define in app source not affecting dll header implementation
Hi all,
I am defineing _DEBUG_ENGINE_ in my testing a so that it will affect the dll projects operation, but it doesent register it as
Being defined.
Am I doing something wrong, because when you include windows.h you can define something to remove rarely used stuff from it,
And I want to do a very similar thing with my dl project,
Thanks for the awnsours in advance.
I am defineing _DEBUG_ENGINE_ in my testing a so that it will affect the dll projects operation, but it doesent register it as
Being defined.
Am I doing something wrong, because when you include windows.h you can define something to remove rarely used stuff from it,
And I want to do a very similar thing with my dl project,
Thanks for the awnsours in advance.
Preprocessor defines only work at compile time. That is, once your dll is built you cannot affect it using defines. A common approach to this is to build the dll twice, once with debug enabled and once without. The two dlls would need different names. Then instruct the IDE to link to the debut library in Debug and the normal one in Release.
Windows.h is different, you aren't removing the functions, just their declarations.
Windows.h is different, you aren't removing the functions, just their declarations.
It would be a good idea to spend some time learning how the C++ compilation model works. Once you understand how the preprocessor is only a slightly more complex version of copy and paste, you will understand why this wouldn't work.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement