Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Frank3000 on December 19, 2005, 01:59:07 pm
-
Hello,
I'm trying to compile the zlib library with codeblocks (rev. 1562).
I need to pass the -DGCC_WINDRES option to windres.exe otherwise I
get a syntax error in zlib1.rc. Where is this possible ?
(except at programs tab direct after windres.exe)
Frank
-
CodeBlocks has no option to send options to the resource compiler (but probably should). You can put the option in Compiler Settings, Other, Advanced options, Compile Win32 Resource File, or as you said after windres.exe. Doing this will send it to all programs compiled with the resource compiler.
What does GCC need that other resource compilers don't? Resource files don't usually contain options that are compiler specific.
-
Hmm... not implemented, sorry.
But, does the resource compiler not support #include?
I think it does... Then you could #include "foo.h" and put #define GCC_WINDRES in there...
-
Thx for your answer.
Resource files don't usually contain options that are compiler specific.
Yes, I haven't seen that before either.
#ifdef GCC_WINDRES
VS_VERSION_INFO VERSIONINFO
#else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
#endif
-
Hmm... not implemented, sorry.
But, does the resource compiler not support #include?
I think it does... Then you could #include "foo.h" and put #define GCC_WINDRES in there...
O.k. but if I wanted to change the source file I could just remove the #if part.
:D
-
The #defines tab is the proper place to define preprocessor flags (-Dflag), regardless of the tool which handles preprocessing (gcc or windres). I don't see why putting GCC_WINDRES here wouldn't not be the right thing to do, as other stages shouldn't be checking for that flag anyway.
-
The #defines tab is the proper place to define preprocessor flags (-Dflag), regardless of the tool which handles preprocessing (gcc or windres).
Options in the #defines tab are not passed to the resource compiler(windres). They are passed only to the source code compiler(g++).