Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: PC_Nerd on February 13, 2010, 02:43:26 am

Title: MinGW windres.exe - How to set compiler flags
Post by: PC_Nerd on February 13, 2010, 02:43:26 am
Hi,

I've run into the same error as http://forums.codeblocks.org/index.php?topic=11573.0 (http://forums.codeblocks.org/index.php?topic=11573.0) and I've checked that there doesnt seem to be any define for GCC_WINDRES, so I want to add one on command line...   I've managed to set a define for all build calls, through the "build options -> Compiler Settings ->#defines" window, however I cannot see that it is added to the windres call:

Quote
mingw32-gcc.exe  -g -W -O0 -DWIN32 -D_DEBUG -DGCC_WINDRES    -IC:\ba_jack_branch.old\Dependencies\include\  -c C:\ogre17\Dependencies\src\zlib-1.2.3\zutil.c -o Win32_LIB_Debug\zutil.o
windres.exe: C:\\ogre17\\DEPEND~1\\src\\ZLIB-1~1.3\\win32\\zlib1.rc:6: syntax error
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings

I've enabled ( as you can see) the full cmd output, and I cannot see the call to windres, only its erroneous output.

Thanks for any help you can offer.
PC_Nerd

Edited: Corrected quoted compiler output.
Title: Re: MinGW windres.exe - How to set compiler flags
Post by: PC_Nerd on February 13, 2010, 02:54:01 am
Update:

Of course as soon as I post and continue searching...  I tinkered a little with the advanced compiler setting, and I added an explicit -DGCC_WINDRES to the resource compiler...   that compiles fine.

So I guess the question now is, how can I do this without changing ALL calls to windres, but only within my project ?

Thanks,
PC_Nerd
Title: Re: MinGW windres.exe - How to set compiler flags
Post by: AndyJ on January 21, 2011, 07:48:13 pm
Sorry to revive an old thread, but I now have exactly the same problem - how can I add a project specific define to the resource compiler command line?

I tried adding this directly to the project file:

      <ResourceCompiler>
         <Add option="-DBUILD_SPECIAL_VERSION" />
         <Add directory="$(#wx)\include" />
         <Add directory="Src" />
      </ResourceCompiler>

but it doesn't seem to work?

Thanks for any help,

Andy
Title: Re: MinGW windres.exe - How to set compiler flags
Post by: stahta01 on January 22, 2011, 12:19:34 am
http://forums.codeblocks.org/index.php?topic=6835.0