Author Topic: Compiler options in template but can't find in GUI  (Read 3405 times)

Offline daddydave

  • Single posting newcomer
  • *
  • Posts: 2
Compiler options in template but can't find in GUI
« on: September 09, 2005, 06:13:48 am »
It seems there are compiler options in the template that i don't see anywhere in the Build Options

I followed these instructions to get my wxWidgets-2.6.1 libs compiled with MS Free Tools.
http://wiki.wxwidgets.org/wiki.pl?MS_Free_Tools_And_WxWidgets

Then I did the following from the CodeBlocks wiki instructions (paraphrased slightly from the Post compilation steps for for vc++ toolkit 2003 compiler):
http://wiki.codeblocks.org/index.php/Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29

Code: [Select]
C:
cd \wxwidgets-2.6.1\build\msw
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb clean
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb
cd \wxwidgets-2.6.1\lib; mkdir codeblocks_vc; cd ..\vc_dll; move * ..\codeblocks_vc; move msw ..\codeblocks_vc

I think move * ..\codeblocks_vc is supposed to be move * codeblocks_vc by the way, I am at a computer where I can't verify that at the moment, but anyway I think I figured that part out and it seemed to work. I don't have any interest in building codeblocks itself, by the way, so  I am not sure if the above was necessary

Then I try to open up a blank wxWidgets project and try to compile without editing it and get the following
Code: [Select]
Project : wxWidgets application
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\keep\private\KODE\
--------------------------------------------------------------------------------
Switching to target: default
cl.exe /nologo -pipe -mthreads -fno-pcc-struct-return -fno-rtti -fno-exceptions -D_X86_ -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ -D__WIN32__ -DSTRICT -D__WXMSW__ -D__WINDOWS__ /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" /I"C:\Program Files\Microsoft SDK\include" /c main.cpp /Fo.objs\main.obj
main.cpp
cl : Command line warning D4002 : ignoring unknown option '-pipe'
cl : Command line warning D4002 : ignoring unknown option '-mthreads'
cl : Command line warning D4002 : ignoring unknown option '-fno-pcc-struct-return'
cl : Command line warning D4002 : ignoring unknown option '-fno-rtti'
cl : Command line warning D4002 : ignoring unknown option '-fno-exceptions'
Then I'm thinking fine, I'll just remove those options from my project and probably from the default wxWidgets template.

But I can't find those build options in my project build options, as if they are hidden somewhere or hard coded.
Snooping a little further I see a file wxwidgets.cbp in the c:\program files\codeblocks\share\codeblocks\templates:

Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE Code::Blocks_project_file>
<Code::Blocks_project_file>
        <FileVersion major="1" minor="1"/>
        <Project>
                <Option title="wxWidgets application"/>
                <Option makefile="Makefile"/>
                <Build>
                        <Target title="default">
                                <Option type="0"/>
                        </Target>
                </Build>
                <Compiler>
                        <Add option="-pipe"/>
                        <Add option="-mthreads"/>
                        <Add option="-fno-pcc-struct-return"/>
                        <Add option="-fno-rtti"/>
                        <Add option="-fno-exceptions"/>
                        <Add option="-D_X86_"/>
                        <Add option="-DWIN32"/>
                        <Add option="-D_WIN32"/>
                        <Add option="-DWINVER=0x0400"/>
                        <Add option="-D__WIN95__"/>
                        <Add option="-D__GNUWIN32__"/>
                        <Add option="-D__WIN32__"/>
                        <Add option="-DSTRICT"/>
                        <Add option="-D__WXMSW__"/>
                        <Add option="-D__WINDOWS__"/>
                </Compiler>
                <Linker>
                        <Add library="wxmsw242"/>
                </Linker>
        </Project>
</Code::Blocks_project_file>

 
It looks like the wxwidgets-static.cbp is the one I want since I would like to use the static (and multilib) version of wxWidgets-2.6.1.

Where are those compiler options like -pipe hidden, or am I supposed to manually edit the wxwidgets.cbp to change thel wxwidgets project defaults as needed. That looks easy to do, just want to make sure that is the standard way.

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Compiler options in template but can't find in GUI
« Reply #1 on: September 09, 2005, 06:58:45 am »
I think this is fixed in CVS (and the upcoming RC2 soon).

Btw, you want to link against the wxWidgets dll (was compiled SHARED=1) not the static version.

Offline daddydave

  • Single posting newcomer
  • *
  • Posts: 2
Re: Compiler options in template but can't find in GUI
« Reply #2 on: September 09, 2005, 07:18:20 am »
I think this is fixed in CVS (and the upcoming RC2 soon).
Good to know :D
Quote
Btw, you want to link against the wxWidgets dll (was compiled SHARED=1) not the static version.

:shock: Does that mean I would have to distribute the wxWidgets.dll with my exe? I'm trying to avoid that.
oh, you mean because i compiled it that way, ok, i didn't realize that is what i was doing. I have static libs in another folder...
« Last Edit: September 09, 2005, 07:27:13 am by daddydave »