Hello,
I've been trying to build a the simple Wx template project supplied with CodeLite
under Windows XP .
Also tried a previous version, but still no success.
I used: New Project -> GUI, Executable( wxWidgets + wxFB frame )
When building, I get the following error:
D:/CodeLiteTest/test1/gui.h:11:21: fatal error: wx/intl.h: No such file or directory
CodeLite version: 4.1.5770
All compiler include directories seem to be ok.
If I run the compiler commands from the command line:
mingw32-make.exe -e -j 2 -f Test_wsp.mk
the output is:
.....
mingw32-make[1]: Entering directory 'd:/CodeLiteTest/test1'
/usr/bin/sh: makedir: command not found
and make is being stopped
It seems there are still some Linux commands being used?
What is going wrong and hiw can I solve this?
Regards,
Ruud
Simple Wx template won't compile under Windows
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Jan 14, 2013 2:21 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- Jarod42
- CodeLite Expert
- Posts: 240
- Joined: Wed Sep 30, 2009 5:54 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: Simple Wx template won't compile under Windows
What is the output of
According to Re: codelite 4.1 is available
Have you try to replace wx-config by this one wx-config.7z.
Code: Select all
wx-config --cxxflags
Have you try to replace wx-config by this one wx-config.7z.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
Make sure that you are not using MSYS/CYWGINruuddb wrote:/usr/bin/sh: makedir: command not found
Native MinGW (no MSYS) should not be using /usr/bin/make
Also, try setting the environment variable (within codelite):
Code: Select all
CMD=cmd.exe
http://forums.codelite.org/viewtopic.ph ... HELL#p8017
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Jan 14, 2013 2:21 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
Hello,
I tried several thing ( but NOT replacing wx-config yet ).
running wx-config --cxxflags gave:
"wx-config Warning: Multiple compiled configurations of wxWidgets have been detec
ted.
Using first detected version by default.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
-mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\ProgCodeLite\wxWi
dgets\lib\gcc_dll\mswu -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -Wno-cto
r-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport
C:\Documents and Settings\ruuddb>wx-config --cxxflags > c:\output
wx-config Warning: Multiple compiled configurations of wxWidgets have been detec
ted.
Using first detected version by default.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use."
There is another application installed on my system that also uses wxWidgets, so
that is possible.
So I added an envrionment variable:
WXCFG=gcc_dll\mswud
then the output becomes:
-mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite
\wxWidgets\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -W
no-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport
Trying to build the sample project within CodeLite results in the same error.
( also adding CMD=cmd.exe as environment var in CodeLite didn't change anything )
Running the compiler from the command line again:
mingw32-make.exe -e -j 2 -f Test_wsp.mk
----------Building project:[ test1 - Debug ]----------
mingw32-make[1]: Entering directory `d:/CodeLiteTest/test1'
g++ -c "D:/CodeLiteTest/test1/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H
-D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets\lib\gcc_dll\msw
ud -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe
-fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I.
cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport
"
mingw32-make[1]: *** [Debug/gui.o] Error 1
mingw32-make[1]: Leaving directory `d:/CodeLiteTest/test1'
mingw32-make.exe: *** [All] Error 2
So this results in a command line error.
Regards,
Ruud
I tried several thing ( but NOT replacing wx-config yet ).
running wx-config --cxxflags gave:
"wx-config Warning: Multiple compiled configurations of wxWidgets have been detec
ted.
Using first detected version by default.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
-mthreads -DHAVE_W32API_H -D__WXMSW__ -DNDEBUG -D_UNICODE -IC:\ProgCodeLite\wxWi
dgets\lib\gcc_dll\mswu -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -Wno-cto
r-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport
C:\Documents and Settings\ruuddb>wx-config --cxxflags > c:\output
wx-config Warning: Multiple compiled configurations of wxWidgets have been detec
ted.
Using first detected version by default.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use."
There is another application installed on my system that also uses wxWidgets, so
that is possible.
So I added an envrionment variable:
WXCFG=gcc_dll\mswud
then the output becomes:
-mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite
\wxWidgets\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -W
no-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport
Trying to build the sample project within CodeLite results in the same error.
( also adding CMD=cmd.exe as environment var in CodeLite didn't change anything )
Running the compiler from the command line again:
mingw32-make.exe -e -j 2 -f Test_wsp.mk
----------Building project:[ test1 - Debug ]----------
mingw32-make[1]: Entering directory `d:/CodeLiteTest/test1'
g++ -c "D:/CodeLiteTest/test1/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H
-D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets\lib\gcc_dll\msw
ud -IC:\ProgCodeLite\wxWidgets\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe
-fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I.
cc1plus.exe: error: unrecognized command line option "-fno-keep-inline-dllexport
"
mingw32-make[1]: *** [Debug/gui.o] Error 1
mingw32-make[1]: Leaving directory `d:/CodeLiteTest/test1'
mingw32-make.exe: *** [All] Error 2
So this results in a command line error.
Regards,
Ruud
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
You have a conflicting installation on your machines
your compiler can not recognize the flag: "-fno-keep-inline-dllexport"
Which g++ version are you using?
Make sure that the proper one is being used by codelite
Do you have cygwin or msys installation on your machine? if you do make sure they don't conflict
Try installing a more recent version of g++, for example the one that comes with codelite.
Why don't you install codelite that comes with g++ / wx / mingw? it will solve you many problems
http://sourceforge.net/projects/codelit ... e/download
IMPORTANT:
Please follow our forum posting rules guidelines
Eran
your compiler can not recognize the flag: "-fno-keep-inline-dllexport"
Which g++ version are you using?
Make sure that the proper one is being used by codelite
Do you have cygwin or msys installation on your machine? if you do make sure they don't conflict
Try installing a more recent version of g++, for example the one that comes with codelite.
Why don't you install codelite that comes with g++ / wx / mingw? it will solve you many problems
http://sourceforge.net/projects/codelit ... e/download
IMPORTANT:
Please follow our forum posting rules guidelines
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Jan 14, 2013 2:21 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
That is exactly what I'm doing. Since I wanted to start from a "known working environment".
I have downloaded from http://sourceforge.net/projects/codelit ... e/download
Then I created a new workspace.
Then I created a new project using vwWidgets.
then press F7 and the output is:
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -e -j 2 -f "test_wsp.mk""
----------Building project:[ test - Debug ]----------
mingw32-make[1]: Entering directory `d:/CodeLiteTest/test'
g++ -c "D:/CodeLiteTest/test/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I.
g++ -c "D:/CodeLiteTest/test/main.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/main.o -I.
In file included from D:/CodeLiteTest/test/gui.cpp:8:0:
D:/CodeLiteTest/test/gui.h:11:21: fatal error: wx/intl.h: No such file or directory
compilation terminated.
In file included from D:/CodeLiteTest/test/main.cpp:14:0:
D:/CodeLiteTest/test/main.h:18:19: fatal error: wx/wx.h: No such file or directory
compilation terminated.
mingw32-make[1]: *** [Debug/main.o] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [Debug/gui.o] Error 1
test.mk:98: recipe for target `Debug/main.o' failed
test.mk:90: recipe for target `Debug/gui.o' failed
mingw32-make[1]: Leaving directory `d:/CodeLiteTest/test'
mingw32-make.exe: *** [All] Error 2
test_wsp.mk:4: recipe for target `All' failed
----------Build Ended----------
2 errors, 0 warnings
So, still no success.
wx-config keeps complaining aobu tmultiple instances, but I have uninstalled every program of
which I know it;s using vxwidgets.
Regards,
Ruud
I have downloaded from http://sourceforge.net/projects/codelit ... e/download
Then I created a new workspace.
Then I created a new project using vwWidgets.
then press F7 and the output is:
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -e -j 2 -f "test_wsp.mk""
----------Building project:[ test - Debug ]----------
mingw32-make[1]: Entering directory `d:/CodeLiteTest/test'
g++ -c "D:/CodeLiteTest/test/gui.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/gui.o -I.
g++ -c "D:/CodeLiteTest/test/main.cpp" -g -O0 -Wall -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\ProgCodeLite\wxWidgets-2.9.4\lib\gcc_dll\mswud -IC:\ProgCodeLite\wxWidgets-2.9.4\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -fno-keep-inline-dllexport -D__WX__ -o ./Debug/main.o -I.
In file included from D:/CodeLiteTest/test/gui.cpp:8:0:
D:/CodeLiteTest/test/gui.h:11:21: fatal error: wx/intl.h: No such file or directory
compilation terminated.
In file included from D:/CodeLiteTest/test/main.cpp:14:0:
D:/CodeLiteTest/test/main.h:18:19: fatal error: wx/wx.h: No such file or directory
compilation terminated.
mingw32-make[1]: *** [Debug/main.o] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
mingw32-make[1]: *** [Debug/gui.o] Error 1
test.mk:98: recipe for target `Debug/main.o' failed
test.mk:90: recipe for target `Debug/gui.o' failed
mingw32-make[1]: Leaving directory `d:/CodeLiteTest/test'
mingw32-make.exe: *** [All] Error 2
test_wsp.mk:4: recipe for target `All' failed
----------Build Ended----------
2 errors, 0 warnings
So, still no success.
wx-config keeps complaining aobu tmultiple instances, but I have uninstalled every program of
which I know it;s using vxwidgets.
Regards,
Ruud
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
The build looks fine, it means that your g++ is not what you think is running
Assuming that you have wxWidgets installed at C:\ProgCodeLite\wxWidgets-2.9.4, your g++ does not understand backslashes
this can only happen if you have *another* g++ installed which belonhs to MSYS or CYGWIN
You need to tell codelite to use the *correct* g++.
TO check which g++ is used by codelite:
- Open gui.cpp in codelite
- Right click on the tab label of gui.cpp
- Select the option 'Open shell at file path'
- a CMD window will open, type: which g++
Please paste the output here
To point codelite's to the correct g++:
settings -> environment variable
add this line:
Last:
Please follow our forum posting guidelines (i.e. use code tags for pasting build output etc)
Eran
Assuming that you have wxWidgets installed at C:\ProgCodeLite\wxWidgets-2.9.4, your g++ does not understand backslashes
this can only happen if you have *another* g++ installed which belonhs to MSYS or CYGWIN
You need to tell codelite to use the *correct* g++.
TO check which g++ is used by codelite:
- Open gui.cpp in codelite
- Right click on the tab label of gui.cpp
- Select the option 'Open shell at file path'
- a CMD window will open, type: which g++
Please paste the output here
To point codelite's to the correct g++:
settings -> environment variable
add this line:
Code: Select all
PATH=C:\Path\to\mingw\bin;$(PATH)
Please follow our forum posting guidelines (i.e. use code tags for pasting build output etc)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 4
- Joined: Mon Jan 14, 2013 2:21 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Simple Wx template won't compile under Windows
Hello Eran,
Thank you. The solution was to re-arrange my PATH variable.
I now can build and run the example.
Regards,
Ruud
Thank you. The solution was to re-arrange my PATH variable.
I now can build and run the example.
Regards,
Ruud