wxwidgets program can not link

CodeLite installation/troubleshooting forum
User avatar
eranif
CodeLite Plugin
Posts: 6145
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by eranif »

shelll wrote:all generated make files are included in those zip archives...
I am sorry I focused on the .project/.workspace file

About the generated makefile:
it looks pretty good to me. It should compile main.cpp, yet you claim it does not.

Try this:
- Physically remove the directory ./Debug (which holds the objects)
- Try to build again - does it been re-created?
- Also: please post here the output of the build after you physically removed the directory ./Debug

Eran
Make sure you have read the HOW TO POST thread
shelll
CodeLite Curious
Posts: 9
Joined: Tue Mar 23, 2010 3:11 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by shelll »

the ./Debug directory is recreated, but it is empy = no object files and here is the build log:

Code: Select all

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "testCon_wsp.mk""
----------Building project:[ testCon - Debug ]----------
mingw32-make.exe[1]: Entering directory `M:/data/cppprojects/testCon'
g++ -o ./Debug/testCon  "-Le:/data/MinGW-4.4.0/lib/" "-Le:/data/libraries/wxWidgets-2008-05-06/lib/gcc_lib/" "-Le:/data/libraries/glew/bin/" "-Le:/data/libraries/boost_1_35_0/lib/" "-Le:/data/libraries/devil/lib/unicode/"  "-L."   
g++: no input files
mingw32-make.exe[1]: *** [Debug/testCon] Error 1
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory `M:/data/cppprojects/testCon'
----------Build Ended----------
0 errors, 0 warnings
if i right click the main.cpp and choose compile, the main.cpp is compiled and object files are created in Debug directory:

Code: Select all

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "testCon.mk"  ./Debug/main.o"
----------Building project:[ testCon - Debug ] (Single File Build)----------
g++ -c  "M:/data/cppprojects/testCon/main.cpp" -g  -o ./Debug/main.o "-Ie:/data/MinGW-4.4.0/include/" "-Ie:/data/libraries/wxWidgets-2008-05-06/include/" "-Ie:/data/libraries/glew/include/" "-Ie:/data/libraries/boost_1_35_0/include/" "-Ie:/data/libraries/devil/include/"  "-I." "-I." 
----------Build Ended----------
0 errors, 0 warnings
but then building the project does not create executable and the build log is the same as the first one in this post (g++: no input files)

release build behaves the same

EDIT:
compiling from command line (mingw32-make.exe -j 2 -f testCon_wsp.mk) gives the same error, so it is probably a problem outsie the codelite
User avatar
eranif
CodeLite Plugin
Posts: 6145
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by eranif »

Shell,

Do you have MSYS installed?
If you have, can you remove it from the path for the sake of the test?

Eran
Make sure you have read the HOW TO POST thread
shelll
CodeLite Curious
Posts: 9
Joined: Tue Mar 23, 2010 3:11 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by shelll »

i do not have MSYS. i removed everything from PATH except mingw's and system's paths, restarted codelite and the compilation still fails.
User avatar
eranif
CodeLite Plugin
Posts: 6145
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by eranif »

shelll wrote:restarted codelite and the compilation still fails.
it does not work from command line.. so I doubt codelite restart can solve this.

Can u re-install codelite with wx + mingw and try compile it with codelite's MinGW?

Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 339
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by evstevemd »

Winmain missing is a shows that OnInit() method is missing!
CodeLite 14.x
CodeLite is awesome, I just Love it!
User avatar
eranif
CodeLite Plugin
Posts: 6145
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by eranif »

evstevemd wrote:Winmain missing is a shows that OnInit() method is missing!
He has another problem:
The main.cpp file does not get compile.. this is why it is missing.

Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 339
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by evstevemd »

eranif wrote:
shelll wrote:restarted codelite and the compilation still fails.
it does not work from command line.. so I doubt codelite restart can solve this.

Can u re-install codelite with wx + mingw and try compile it with codelite's MinGW?

Eran
I would also vote this, as it will fix underhood problems
CodeLite 14.x
CodeLite is awesome, I just Love it!
shelll
CodeLite Curious
Posts: 9
Joined: Tue Mar 23, 2010 3:11 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: wxwidgets program can not link

Post by shelll »

unistalled CL, deleted all left over directories and files. i also uninstalled code::blocks. newly installed cl+mingw+wx package and all runs fine :) this is my main pc with win xp. during weekend i will do the same with notebook with win 7 x64.

i hope it is not a conflict with code::blocks because i use it for designing wxwidgets gui...
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: wxwidgets program can not link

Post by jfouche »

shelll wrote:i hope it is not a conflict with code::blocks because i use it for designing wxwidgets gui...
Give a try to http://www.wxformbuilder.org/, it's available as CodeLite plugin...
Jérémie
Post Reply