Page 2 of 3

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 2:17 pm
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

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 3:17 pm
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

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 3:25 pm
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

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 4:44 pm
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.

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 4:48 pm
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

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 5:53 pm
by evstevemd
Winmain missing is a shows that OnInit() method is missing!

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 5:54 pm
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

Re: wxwidgets program can not link

Posted: Thu Mar 25, 2010 6:59 pm
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

Re: wxwidgets program can not link

Posted: Fri Mar 26, 2010 8:37 pm
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...

Re: wxwidgets program can not link

Posted: Fri Mar 26, 2010 8:46 pm
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...