Page 1 of 2
Use an environment variable for Codelite development paths
Posted: Sun Nov 09, 2008 2:58 am
by coder99
It would make it easier - at least for myself - if the Codelite development work spaces used a common environment variable to point to the include files and lib/dlls of wxWidgets, rather than the relative paths used at present.
In that way, it would be eaiser as well to test a new release of wxWidgets, before committing to it more definitely
Re: Use an environment variable for Codelite development paths
Posted: Sun Nov 09, 2008 7:50 am
by eranif
coder99 wrote:It would make it easier - at least for myself - if the Codelite development work spaces used a common environment variable to point to the include files and lib/dlls of wxWidgets, rather than the relative paths used at present.
In that way, it would be eaiser as well to test a new release of wxWidgets, before committing to it more definitely
Since CodeLite uses wx-config to detect the paths/lib-paths of the wxWidgets, you can use that you achieve what you want:
Simple define WXWIN & WXCFG environment variables inside CodeLite to point to other installations of wxWidgets.
where WXWIN (e.g. C:\wxWidgets-2.8.7) points to the base path of your WX installation and WXCFG points to the configuration (e.g. gcc_dll\mswu)
Eran
Re: Use an environment variable for Codelite development paths
Posted: Tue Nov 11, 2008 3:44 am
by coder99
That is what I have done, but I still get compile errors because the paths I had specified in addition get lost when the workspace file for a project gets updated.
I just set up all paths late last week to compile the latest (at that time) SVN version and just now I updated my workspace and of course, several paths are 'gone'.
My thought was that if the workspace files used the macro - or similar macros specific to CL - rather than the generic wxWidget WXWIN, which might be used for other things while I am not completely converted to CL - so that the paths specified by the macros don't get lost. But perhaps I have to be more careful about updating and and saving the old workspace files, although it does come down to the same cut&paste procedure either way.
Re: Use an environment variable for Codelite development paths
Posted: Tue Nov 11, 2008 9:06 am
by eranif
coder99 wrote:That is what I have done, but I still get compile errors because the paths I had specified in addition get lost when the workspace file for a project gets updated.
I just set up all paths late last week to compile the latest (at that time) SVN version and just now I updated my workspace and of course, several paths are 'gone'.
Which paths are gone?
You should be able to build codelite out-of-the-box (
many people do build codelite out of the box without any changes)
The problem is your with environment, describe here why you needed these paths? and what did you add?
Eran
Re: Use an environment variable for Codelite development paths
Posted: Tue Nov 11, 2008 11:11 pm
by coder99
Sorry for being so cryptic
- I suppose I was too much in a rush.
My Environment variables _inside_ CL 2304 (used to build the latest SVN version) are
WXCFG: gcc_lib\mswud
WXWIN: d:\wxWidgetsEclipse2.8.9
To compile without errors because the compiler can't find headers, for most projects within CL I have to define
for the compiler:
$(WXCODELITE)/include
$(WXCODELITE)/lib/gcc_dll/mswu
where I have defined at the system level
WXCODELITE=d:\wxWidgetsEclipse2.8.9\
Similarly I have to define for most project for the linker:
$(WXCODELITE)/lib/gcc_dll
The last time I updated CL project, one of the workspace files was also updated, which in turn 'lost' the changes I had made locally and I had to re-insert the additional paths to make that project compile.
That is the problem I am trying to sort out. It may well be a misunderstanding on my end as to just how these environment variables are to be used.
As I t is, at this time I still have some older projects which depend on older versions or non-Unicode versions of the wxWidgets libraries and until I get a chance to move them to a later or different configuration, I want to keep the older libraries available as well as the environment variables which point to them.
Re: Use an environment variable for Codelite development paths
Posted: Thu Nov 13, 2008 10:47 pm
by eranif
Please give a try to the new CodeLite I releases which includes bundled WX libraries.
http://downloads.sourceforge.net/codeli ... se_mirror=
And see if it fixes the environment problem u have
Eran
Re: Use an environment variable for Codelite development paths
Posted: Fri Nov 14, 2008 4:58 am
by coder99
OK, I'll have a go at it , possibly later today, possibly not till sometime later this week.
Re: Use an environment variable for Codelite development paths
Posted: Fri Nov 14, 2008 10:45 pm
by coder99
After downloading the package I installed it in c:\Codelite-n;
then I created as new workspace clTest in the default place, build a default wxWidgets project and tried to compile it.
It gives me the following errors
Code: Select all
Building:
"mingw32-make.exe" -j 2 -f "clTest_wsp.mk"
----------Building project:[ clTest - Debug ]----------
g++ -c "C:/Program Files/CodeLite-n/clTest/cltest_app.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.8.9-n\lib\gcc_dll\mswud -IC:\wxWidgets-2.8.9-n\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/cltest_app.o
g++ -c "C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.8.9-n\lib\gcc_dll\mswud -IC:\wxWidgets-2.8.9-n\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/cltest_frame.o
In file included from C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:1:
C:/Program Files/CodeLite-n/clTest/cltest_app.h:4:20: wx/app.h: No such file or directory
In file included from C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:1:
C:/Program Files/CodeLite-n/clTest/cltest_app.h:6: error: expected class-name before '{' token
In file included from C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:1:
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:4:22: wx/frame.h: No such file or directory
In file included from C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:1:
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:6: error: expected class-name before '{' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:13: error: expected `)' before '*' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:23: error: ISO C++ forbids declaration of `DECLARE_EVENT_TABLE' with no type
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:23: error: expected `;' before "void"
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:24: error: `wxCommandEvent' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:24: error: ISO C++ forbids declaration of `e' with no type
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:2:22: wx/image.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:3:23: wx/sysopt.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:4:27: wx/xrc/xmlres.h: No such file or directory
In file included from C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:5:
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:4:22: wx/frame.h: No such file or directory
In file included from C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:5:
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:6: error: expected class-name before '{' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:2:24: wx/toolbar.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:3:25: wx/statusbr.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:4:22: wx/sizer.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:5:33: wx/menu.h: No such file or directory
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:7: error: `wxFrame' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:13: error: expected `)' before '*' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:8: error: expected constructor, destructor, or type conversion before "EVT_CLOSE"
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:23: error: ISO C++ forbids declaration of `DECLARE_EVENT_TABLE' with no type
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:23: error: expected `;' before "void"
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:24: error: `wxCommandEvent' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_frame.h:24: error: ISO C++ forbids declaration of `e' with no type
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:9: error: expected constructor, destructor, or type conversion before "CltestApp"
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp: In member function `void CltestFrame::Initialize()':
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:30: error: `wxBoxSizer' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:30: error: `sz' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:30: error: `wxBoxSizer' is not a type
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:30: error: `wxVERTICAL' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:31: error: `SetSizer' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:34: error: `wxStatusBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:34: error: `statusBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:34: error: `wxStatusBar' is not a type
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:34: error: `wxID_ANY' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:36: error: `SetStatusBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:37: error: `GetStatusBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:37: error: `wxT' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp: At global scope:
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:45: error: variable or field `OnClose' declared void
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:45: error: `int CltestFrame::OnClose' is not a static member of `class CltestFrame'
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:45: error: `wxCloseEvent' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:45: error: `e' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:46: error: expected `,' or `;' before '{' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:50: error: variable or field `OnQuit' declared void
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:50: error: `int CltestFrame::OnQuit' is not a static member of `class CltestFrame'
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:50: error: `wxCommandEvent' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:50: error: `e' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:51: error: expected `,' or `;' before '{' token
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp: In member function `void CltestFrame::CreateMenuBar()':
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:58: error: `wxMenuBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:58: error: `mb' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:58: error: `wxMenuBar' is not a type
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:60: error: `wxMenu' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:60: error: `menu' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:60: error: `wxMenu' is not a type
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:61: error: `wxID_EXIT' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:62: error: `wxT' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_frame.cpp:63: error: `SetMenuBar' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp: In member function `virtual bool CltestApp::OnInit()':
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:20: error: `wxSystemOptions' has not been declared
mingw32-make[1]: *** [Debug/cltest_frame.o] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:20: error: `_T' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:20: error: `SetOption' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:21: error: `wxXmlResource' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:21: error: `Get' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:22: error: `wxImage' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:22: error: `wxPNGHandler' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:22: error: `AddHandler' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:23: error: `wxImage' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:23: error: `wxCURHandler' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:24: error: `wxImage' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:24: error: `wxICOHandler' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:25: error: `wxImage' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:25: error: `wxXPMHandler' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:26: error: `wxImage' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:26: error: `wxGIFHandler' has not been declared
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:28: error: `wxFrame' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:28: error: `frame' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:28: error: `NULL' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:29: error: `wxID_ANY' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:30: error: `wxT' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:31: error: `wxDefaultPosition' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:32: error: `wxSize' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:32: error: new initializer expression list treated as compound expression
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:36: error: `TRUE' was not declared in this scope
C:/Program Files/CodeLite-n/clTest/cltest_app.cpp:37: error: `SetTopWindow' was not declared in this scope
mingw32-make[1]: *** [Debug/cltest_app.o] Error 1
mingw32-make.exe: *** [All] Error 2
0 errors, 0 warnings, total time: 00:00:01 seconds
----------Build Ended----------
I'm not sure if that proves anything, but if you would like me to try different scenarios, I'm willing to give it a try.
BTW, I have installed CL in c:\program files\codelite-n, wxWidgets in c:\wxWidgets-2.8.9-n and MingW in c:\mingw-3.4.5-n.
However I also installed it on an older machine which did not have any CL, MingW 3.4.5 or wxWidgets 2.8.9 and gave it a try there.
After building the test workspace as above and a default wxWidgets project - as per tutorial - here is what I got:
Code: Select all
Building:
"mingw32-make.exe" -j 1 -f "test_wsp.mk"
----------Building project:[ wxTest - Debug ]----------
Syntax error: Unterminated quoted string
mingw32-make.exe[1]: *** [Debug/wxtest_app.o.d] Error 2
mingw32-make.exe: *** [All] Error 2
0 errors, 0 warnings, total time: 00:00:01 seconds
----------Build Ended----------
where test_wsp.mk contains:
Code: Select all
.PHONY: clean All
All:
@echo ----------Building project:[ wxTest - Debug ]----------
@"mingw32-make.exe" -j 1 -f "wxTest.mk"
clean:
@echo ----------Cleaning project:[ wxTest - Debug ]----------
@"mingw32-make.exe" -j 1 -f "wxTest.mk" clean
Re: Use an environment variable for Codelite development paths
Posted: Sat Nov 15, 2008 1:21 am
by eranif
I really cant see the problem here, unless the missing files are really missing...
For example:
Can you confirm that the file C:\wxWidgets-2.8.9-n\include\wx\app.h does exist?
Another direction to check:
Which g++ is used?
coder99 wrote:After building the test workspace as above and a default wxWidgets project - as per tutorial - here is what I got:
Can u post the content of the file wxTest.mk ?
Eran
Re: Use an environment variable for Codelite development paths
Posted: Sat Nov 15, 2008 6:04 am
by coder99
Please ignore the current post for now; things were a bit hectic (and possibly very confused) here and I have restarted the whole thing and will revisit this issue tomorrow, I hope.
=============================
eranif wrote:I really cant see the problem here, unless the missing files are really missing...
For example:
Can you confirm that the file C:\wxWidgets-2.8.9-n\include\wx\app.h does exist?
Interestingly, I'm sure I asked the installation to go to c:\wxWidgets-2.8.9-n but it ended up in c:\wxWidgets-2.8.9 - so the file does not exist,
but C:\wxWidgets-2.8.9\include\wx\app.h does
eranif wrote:]
Another direction to check:
Which g++ is used?
coder99 wrote:After building the test workspace as above and a default wxWidgets project - as per tutorial - here is what I got:
Can u post the content of the file wxTest.mk ?
Eran
Another g++ exists in c:\MingW\bin, but it is not on the path and neither is the one from c:\MingW-3.4.5
Contents of wxTest.mk
Code: Select all
##
## Auto Generated makefile, please do not edit
##
WXWIN:=C:\wxWidgets-2.8.9
WXCFG:=gcc_dll\mswu
ProjectName:=wxTest
## Debug
ConfigurationName :=Debug
IntermediateDirectory :=./Debug
OutDir := $(IntermediateDirectory)
LinkerName:=g++
ArchiveTool :=ar rcu
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix :=.o
DebugSwitch :=-gstab
IncludeSwitch :=-I
LibrarySwitch :=-l
OutputSwitch :=-o
LibraryPathSwitch :=-L
PreprocessorSwitch :=-D
SourceSwitch :=-c
CompilerName :=g++
OutputFile :=$(IntermediateDirectory)/wxTest
Preprocessors :=$(PreprocessorSwitch)__WX__
ObjectSwitch :=-o
ArchiveOutputSwitch :=
CmpOptions :=-g $(shell wx-config --cxxflags --unicode=yes --debug=yes) $(Preprocessors)
RcCmpOptions :=$(shell wx-config --rcflags)
RcCompilerName :=windres
LinkOptions := -O2 $(shell wx-config --debug=yes --libs --unicode=yes) -mwindows
IncludePath :=
RcIncludePath :=
Libs :=
LibPath :=
Objects=$(IntermediateDirectory)/wxtest_app$(ObjectSuffix) $(IntermediateDirectory)/wxtest_frame$(ObjectSuffix)
##
## Main Build Tragets
##
all: $(OutputFile)
$(OutputFile): makeDirStep $(Objects)
@makedir $(@D)
$(LinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)
makeDirStep:
@makedir "./Debug"
PreBuild:
##
## Objects
##
$(IntermediateDirectory)/wxtest_app$(ObjectSuffix): wxtest_app.cpp $(IntermediateDirectory)/wxtest_app$(ObjectSuffix).d
@makedir "./Debug"
$(CompilerName) $(SourceSwitch) "C:/Program Files/CodeLite/test/wxtest_app.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/wxtest_app$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/wxtest_app$(ObjectSuffix).d:
@makedir "./Debug"
@$(CompilerName) $(CmpOptions) $(IncludePath) -MT$(IntermediateDirectory)/wxtest_app$(ObjectSuffix) -MF$(IntermediateDirectory)/wxtest_app$(ObjectSuffix).d -MM "C:/Program Files/CodeLite/test/wxtest_app.cpp"
$(IntermediateDirectory)/wxtest_frame$(ObjectSuffix): wxtest_frame.cpp $(IntermediateDirectory)/wxtest_frame$(ObjectSuffix).d
@makedir "./Debug"
$(CompilerName) $(SourceSwitch) "C:/Program Files/CodeLite/test/wxtest_frame.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/wxtest_frame$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/wxtest_frame$(ObjectSuffix).d:
@makedir "./Debug"
@$(CompilerName) $(CmpOptions) $(IncludePath) -MT$(IntermediateDirectory)/wxtest_frame$(ObjectSuffix) -MF$(IntermediateDirectory)/wxtest_frame$(ObjectSuffix).d -MM "C:/Program Files/CodeLite/test/wxtest_frame.cpp"
##
## Clean
##
clean:
$(RM) $(IntermediateDirectory)/wxtest_app$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/wxtest_app$(ObjectSuffix).d
$(RM) $(IntermediateDirectory)/wxtest_frame$(ObjectSuffix)
$(RM) $(IntermediateDirectory)/wxtest_frame$(ObjectSuffix).d
$(RM) $(OutputFile)
$(RM) $(OutputFile).exe
-include $(IntermediateDirectory)/*.d
I won't likelyy be able to do much testing until tomorrow, though