Is there a mean under windows to see exactly with what parameters gcc is called ?
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="2" />
<Project>
<Option title="wx static" />
<Option pch_mode="0" />
<Option compiler="0" />
<Build>
<Target title="default">
<Option output="wxwidgets_static.exe" />
<Option type="0" />
<Option compiler="0" />
<Option includeInTargetAll="1" />
<Option projectResourceIncludeDirsRelation="0" />
</Target>
<Environment>
<Variable name="WX_CFG" value="" />
</Environment>
</Build>
<Compiler>
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option="-Winvalid-pch" />
<Add option='-include "wx_pch.h"' />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DUSE_PCH" />
<Add directory="$(#WX.include)" />
<Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)\msw" />
<Add directory="$(#WX)\contrib\include" />
</Compiler>
<ResourceCompiler>
<Add directory="$(#WX.include)" />
</ResourceCompiler>
<Linker>
<Add library="wxmsw26" />
<Add library="winspool" />
<Add library="winmm" />
<Add library="shell32" />
<Add library="comctl32" />
<Add library="ctl3d32" />
<Add library="odbc32" />
<Add library="advapi32" />
<Add library="wsock32" />
<Add library="opengl32" />
<Add library="glu32" />
<Add library="ole32" />
<Add library="oleaut32" />
<Add library="uuid" />
<Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)" />
<Add directory="$(#WX.lib)" />
</Linker>
<Unit filename="main.cpp">
<Option compilerVar="CPP" />
<Option target="default" />
</Unit>
<Unit filename="main.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="default" />
</Unit>
<Unit filename="wx_pch.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="default" />
</Unit>
<Unit filename="wx_pch.h">
<Option compilerVar="CPP" />
<Option link="0" />
<Option weight="0" />
<Option target="default" />
</Unit>
</Project>
</CodeBlocks_project_file>
which version of codeblocks are you using ? ( a recent SVN build or 1.0RC2 )
if you have a recent SVN build of CB, you can use the following project file, which builds static wx-apps fine
you just have to edit the global variable WX (add Base directory)Code<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="2" />
<Project>
<Option title="wx static" />
<Option pch_mode="0" />
<Option compiler="0" />
<Build>
<Target title="default">
<Option output="wxwidgets_static.exe" />
<Option type="0" />
<Option compiler="0" />
<Option includeInTargetAll="1" />
<Option projectResourceIncludeDirsRelation="0" />
</Target>
<Environment>
<Variable name="WX_CFG" value="" />
</Environment>
</Build>
<Compiler>
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option="-Winvalid-pch" />
<Add option='-include "wx_pch.h"' />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DUSE_PCH" />
<Add directory="$(#WX.include)" />
<Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)\msw" />
<Add directory="$(#WX)\contrib\include" />
</Compiler>
<ResourceCompiler>
<Add directory="$(#WX.include)" />
</ResourceCompiler>
<Linker>
<Add library="wxmsw26" />
<Add library="winspool" />
<Add library="winmm" />
<Add library="shell32" />
<Add library="comctl32" />
<Add library="ctl3d32" />
<Add library="odbc32" />
<Add library="advapi32" />
<Add library="wsock32" />
<Add library="opengl32" />
<Add library="glu32" />
<Add library="ole32" />
<Add library="oleaut32" />
<Add library="uuid" />
<Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)" />
<Add directory="$(#WX.lib)" />
</Linker>
<Unit filename="main.cpp">
<Option compilerVar="CPP" />
<Option target="default" />
</Unit>
<Unit filename="main.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="default" />
</Unit>
<Unit filename="wx_pch.h">
<Option compilerVar="" />
<Option compile="0" />
<Option link="0" />
<Option target="default" />
</Unit>
<Unit filename="wx_pch.h">
<Option compilerVar="CPP" />
<Option link="0" />
<Option weight="0" />
<Option target="default" />
</Unit>
</Project>
</CodeBlocks_project_file>
I have Codeblocks 1.0RC2 because I never managed to compiled a SVN version.
But I didin't see in Cb 1.0RC2 that I could specify wxWidgets as a static lib.
I have Codeblocks 1.0RC2 because I never managed to compiled a SVN version.you can download one here http://paginas.terra.com.br/informatica/mauricio/codeblocks/
But I didin't see in Cb 1.0RC2 that I could specify wxWidgets as a static lib.that's left to you as homework :) and when you've managed it - save it as user-template
However it assumes that wxWidget has been compiled as a monolithic lib and it's not always the case.
Developers should ask user to indicate how was compiled wxwidgets (shared | monolithic).
but that's the tricky part! better go with MONOLITHIC wxwidgets versionBut I didin't see in Cb 1.0RC2 that I could specify wxWidgets as a static lib.AFAIK, you should add the needed libraries to the linker. I do not think that there is a special option for that.
but that's the tricky part! better go with MONOLITHIC wxwidgets version
I tried this last week, but I had to include all the libraries before I was able to compile anything... :?but that's the tricky part! better go with MONOLITHIC wxwidgets version
MONOLITHIC is easier to build and handle (I use it myself for those reasons :)), but if you do not need all the wxWidgets functionalities and/or is the lib size a constraint, then better build just the needed libraries.
... but I had to include all the libraries before I was able to compile anything... :?that's exactly with what it results at last.
... but I had to include all the libraries before I was able to compile anything... :?that's exactly with what it results at last.
the only example where i managed to use the non-monolithic version of wxwidgets reasonably was,
when i built console applications using wxBase only without any GUI stuff.