News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

compiling wxWidgets in a MSYS/minGW environment

Started by blue orb, November 05, 2011, 11:16:12 AM

Previous topic - Next topic

blue orb

ok, i have compiled wxWidgets 2.8.10 using MSYS = cd $WXWIN and /c/wxWidgets-2.8.10 etc.

but, it doesn't work properly.  bah!!

what can i do about this MSYS/minGW environment problem?

yes :)

MortenMacFly

Quote from: blue orb on November 05, 2011, 11:16:12 AM
what can i do about this MSYS/minGW environment problem?
You don't need this environment to compile wxWidgets. Instead, do the following:

1.) Make sure the PATH environment variable is clean and does not point to any GCC / MSYS / MINGW installation folders!
2.) Install the TDM GCC compiler
3.) Go into the wxWidgets source file folder root (the one, where e.g. configure.in is in)
4.) Open a command prompt there and do:

set PATH=[PATH_TO_TDM_GCC_BIN_(!)_FOLDER];%PATH%
cd build\msw
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1 clean
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1

Do it exactly like this (of course adapt the path to the TDM GCC bin folder) and it will work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

blue orb

thanks for the help!

i have learnt some good things from your post. :)

i think that wxWidgets 2.8.10 has actually compiled ok.

but, i still get debug configuration warnings when i try to set up a new wxWidgets project.

could it be > project > build options/properties?

it feels like nothing else can be done... wxPack it is then!

MortenMacFly

#3
Quote from: blue orb on November 05, 2011, 02:23:35 PM
but, i still get debug configuration warnings when i try to set up a new wxWidgets project.
To build the debug version of wxWidgets, do the same as I said before, simply removing this line:

mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1 clean

...and changing this line:

mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=release SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1

...into:

mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=debug SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1

However, you might not need this until you want to debug into wxWidgets code, too (which you normally don't). Instead, you could also simply use the same wx (!) flags for the debug target as for the release target, namely #defines and libs.

EDIT: ...for the record: All this information and even more you will also find in our Wiki.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

blue orb

do i need to re-install wxWidgets 2.8.10, first?

if not, should i just redo the process again?

Alpha

The debug build is created in a different directory, so all you have to do is run the new command (the two builds do not conflict).

blue orb

finally, i have got it working...

but do i need to execute this line of code:

mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=debug SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1 clean

yes :)

Alpha

Quote from: blue orb on November 05, 2011, 07:12:17 PM
mingw32-make -f makefile.gcc CXXFLAGS="-fno-keep-inline-dllexport" BUILD=debug SHARED=1 MONOLITHIC=1 USE_XRC=1 USE_OPENGL=1 UNICODE=1 clean
This command cleans (deletes) all files related to the specific build; it is good practice to use it before compiling to ensure nothing will interfere, however running afterwards would just delete everything you spent time to compile.