wx-config question

General questions regarding the usage of CodeLite
ndivner
CodeLite Enthusiast
Posts: 37
Joined: Sun Mar 16, 2008 12:49 pm
Contact:

wx-config question

Post by ndivner »

Hi,

I am using codelite v2.9.0-4684 on Win-XP SP3 with gcc version 4.5.2.

Up until now I have not used codelite for wxWidgets projects on Win-XP but decided to give it a go.

I created a new workspace and added a wxWidgets project which autmatically added a main.cpp.
On building this project I get a compiler error as forllows

Code: Select all

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 1 -f "gcc-test_wsp.mk""
----------Building project:[ gcc_test - Debug ]----------
mingw32-make[1]: Entering directory `H:/Projects/gcc-test/gcc-test'
g++ -c  "H:/Projects/gcc-test/gcc-test/main.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IH:\wxWidgets-2.8.12\lib\gcc_dll\mswud -IH:\wxWidgets-2.8.12\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0    -D__WX__  -o ./Debug/main.o "-I." 
H:/Projects/gcc-test/gcc-test/main.cpp:12:19: fatal error: wx/wx.h: No such file or directory
compilation terminated.
mingw32-make[1]: *** [Debug/main.o] Error 1
mingw32-make[1]: Leaving directory `H:/Projects/gcc-test/gcc-test'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
1 errors, 0 warnings, total time: 00:00:16 seconds
Note the -IH:\wxWidgets-2.8.12\include above

If instead I use
g++ main.cpp -IH:/wxWidgets-2.8.12/include -IH:/wxWidgets-2.8.12/lib/gcc_dll/mswu
wx/wh.h is found ok.

What do I need to do to overcome this problem??

Many thanks

Noel
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wx-config question

Post by eranif »

This means that you are using mixed toolchain from Cygwin / MinGW.

Make sure that the MinGW toolchain is located before the Cygwin toolchain in the path, or as an alternative, use a full path for g++ (can be configured from: Settings | Build Settings | Compilers | g++ | Tools)

Eran
Make sure you have read the HOW TO POST thread
ndivner
CodeLite Enthusiast
Posts: 37
Joined: Sun Mar 16, 2008 12:49 pm
Contact:

Re: wx-config question

Post by ndivner »

Hi Eran,

Thank you for setting me straight.

The problem started when I upgraded to gcc 4.5. This worked fine for all my non wxWidgets projects but gave me problems
compiling a wxWidgets monolithic DLL. I googled and found that it was caused by a problem with inline functions which caused
the output to grow so much that you ran out of memory. I then found TDM-GCC which fixed the problem and I now could
compile wxWidgets. This tool chain works fine with MSYS but it certainly is not compatible with Codelite. As well as the
"Back Slashes" I also found there is a problen executing the postbuild "copy" commands. Here using "cp" instead of "copy"
works but this is not a good solution. I have now downloaded your version of mingw32-4.1.1 and all is well.

Thank you for the help,
It is much appreciated.

Noel.
ndivner
CodeLite Enthusiast
Posts: 37
Joined: Sun Mar 16, 2008 12:49 pm
Contact:

Re: wx-config question

Post by ndivner »

Hi Eran et al,

I have tracked down the cause of my problem which is described above

The reason is that mingw32-make.exe behaves differently depending on whether sh.exe is in the search PATH.
I found the following whilst I was chasing down something else altogether and I quote
From v3.77 upwards, make searches for a sh.exe on the path. If it does not find one, it switches to win32 make mode that is it uses intermediate batch files for command processing.
This is fine until your makefile tries to execute something like mkdir, which will invoke the internal mkdir from cmd.exe or command.com. As the results may not be to your liking, you may prefer to use the sh.exe provide here.
Renaming sh.exe to something else allows wx-config to be invoked properly.

Cheers,

Noel.
Post Reply