Page 1 of 1

difficulty in compilation sample program

Posted: Mon Jan 16, 2012 6:00 pm
by wgt
Hi,

I have just installed codelite 3.5.5377, in windows 7. I had already installed MinGW. Upon installation of CL, according to instructions in documentation page, i set the environment variables, as follows:

Code: Select all

CodeLiteDir=C:\Program Files (x86)\CodeLite
PATH=%PATH%;e:\Progs\\MinGW\bin;C:\Program Files (x86)\CodeLite
WXWIN=e:\progs\wx
WXCFG=gcc_lib\mswu
I had to include the CL path to the PATH variable so that makedir.exe could be found.
I also inserted the PATH ENVIRONMENT VARIABLE in the Build settings->Compilers dialog to:

Code: Select all

PATH=%PATH;e:\\Progs\\MinGW\\bin
I then created a sample project using a wxFB frame, but when i try to complie it i get the result:

Code: Select all

----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe"  -j 1 -f "codelite_wsp.mk""
----------Building project:[ teste2 - Release ]----------
process_begin: CreateProcess(NULL, wx-config --cxxflags --unicode=yes --debug=no, ...) failed.
process_begin: CreateProcess(NULL, wx-config --cxxflags --unicode=yes --debug=no, ...) failed.
process_begin: CreateProcess(NULL, wx-config --debug=no --libs --unicode=yes, ...) failed.
mingw32-make.exe[1]: Entering directory `E:/Progs/codelite/teste2'
g++  -c  "E:/Progs/codelite/teste2/gui.cpp" -O2 -Wall  -D__WX__  -o ./Release/gui.o -I. 
In file included from E:/Progs/codelite/teste2/gui.cpp:8:0:
E:/Progs/codelite/teste2/gui.h:11:21: fatal error: wx/intl.h: No such file or directory
compilation terminated.
mingw32-make.exe[1]: *** [Release/gui.o] Error 1
mingw32-make.exe: *** [All] Error 2
mingw32-make.exe[1]: Leaving directory `E:/Progs/codelite/teste2'
----------Build Ended----------
1 errors, 0 warnings
Although the error message is about not finding "wx/intl.h", i think the real problem is in the call to wx-config, which does not mention the WXWIN or WXCFG variables, so that the include directories are not mentioned to the complier - when I tested wx-config in command line, it asked me to insert those arguments.

Can anyone help to find what I am missing?

Thanks a lot

Re: difficulty in compilation sample program

Posted: Wed Jan 18, 2012 11:13 am
by eranif
wgt wrote:I had to include the CL path to the PATH variable so that makedir.exe could be found.
If you had to do this, then there is something wrong in your setup
wgt wrote:I also inserted the PATH ENVIRONMENT VARIABLE in the Build settings->Compilers dialog to:
PATH=%PATH;e:\\Progs\\MinGW\\bin
This is *NOT* how its done.

codelite understand codelite's syntax and NOT the Windows syntax (not to mention that your syntax is wrong even for Windows ;) (you are missing one '%'))
The correct way to do it (and this is probably why you had to add codelite's path to the PATH environment variable):

Code: Select all

PATH=$(PATH);e:\Progs\MinGW\bin
In short, your problem is that you messed up the PATH environment variable

Eran

Re: difficulty in compilation sample program

Posted: Wed Jan 18, 2012 4:00 pm
by wgt
Thank you very much, Eran.
I was really missing something that right in front of my eyes...

Everything works now.

wgt.