Page 1 of 2
					
				Adding search path
				Posted: Thu Sep 09, 2010 9:11 am
				by evstevemd
				Hi,
I have made a project that Uses sqlite3.h. the file works fine in its project folder (sqlite3) but when I try to include the same file in another project (wxsqlite3) Compiler cannot find it. I have tried to add different paths to search path but I cannot find  a way out (../sdk/sqlite3, ../../sdk/sqlite3, ./sdk/sqlite3, $(WorkspacePath)/sdk/sqlite3 and anything I can think of)
Can one please help me!
			 
			
					
				Re: Adding search path
				Posted: Thu Sep 09, 2010 9:55 am
				by eranif
				When codelite compiles a project, it changes the directory to the project directory (i.e. the directory where the .project exists).
So in your case, when codelite will start building wxsqlite3, it will set its directory to the wxsqlite3 directory.
So you should add include path:
Some hints: in the build windows, before codelite builds a project, it will write in grey the lines:
"Entering directory /some/path"
this should give you a hint where is the current working directory is.
Eran
 
			
					
				Re: Adding search path
				Posted: Thu Sep 09, 2010 11:25 am
				by evstevemd
				Hi Eran,
I still get the error
My Compiler additional search path is 
.;../../sdk/sqlite3;../sqlite3
Code: Select all
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 2 -f "myproject_wsp.mk""
----------Building project:[ wxqslite3 - DebugUnicode ]----------
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/stefano/Desktop/myproject/sdk/wxqslite3'
C:/Documents and Settings/stefano/Desktop/myproject/sdk/wxqslite3/wxsqlite3.cpp:46:21: error: sqlite3.h: No such file or directory
mingw32-make.exe[1]: *** [../../sdk/work/wxsqlite3/wxsqlite3.o.d] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/stefano/Desktop/myproject/sdk/wxqslite3'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
1 errors, 0 warnings
 
			
					
				Re: Adding search path
				Posted: Thu Sep 09, 2010 12:28 pm
				by eranif
				Try build with -j2 (it seems like some of the output is missing, so it is hard to tell what the error is)
Settings -> Build Settings -> Build System and reduce the 'No. of concurrent jobs' to 1
Post here the output again
Eran
			 
			
					
				Re: Adding search path
				Posted: Thu Sep 09, 2010 2:22 pm
				by evstevemd
				Note, the -J2 option is unrecognized (Added to Compiler options)
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 1 -f "MyProject_wsp.mk""
----------Building project:[ wxqslite3 - DebugUnicode ]----------
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3'
C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3/wxsqlite3.cpp:46:21: error: sqlite3.h: No such file or directory
g++: unrecognized option '-j2'
mingw32-make.exe[1]: *** [../../sdk/work/wxsqlite3/wxsqlite3.o.d] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
1 errors, 0 warnings
			 
			
					
				Re: Adding search path
				Posted: Thu Sep 09, 2010 6:08 pm
				by eranif
				Can you send over the project zipped (attach it to this thread)?
Eran
			 
			
					
				Re: Adding search path
				Posted: Fri Sep 10, 2010 8:14 am
				by evstevemd
				Here it is!
			 
			
					
				Re: Adding search path
				Posted: Fri Sep 10, 2010 8:59 am
				by eranif
				remove the -j2 flag that you added in 'Compiler Options' (-j2 is *not* a compiler option), also, if you wish to add options, you need to add them with semi colon separating between the different options.
Try to re-build and paste the output here
Eran
			 
			
					
				Re: Adding search path
				Posted: Fri Sep 10, 2010 9:48 am
				by evstevemd
				Still it cannot build  
 
 
Code: Select all
----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 1 -f "MyProject_wsp.mk""
----------Building project:[ wxqslite3 - DebugUnicode ]----------
mingw32-make.exe[1]: Entering directory `C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3'
C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3/wxsqlite3.cpp:46:21: error: sqlite3.h: No such file or directory
mingw32-make.exe[1]: *** [../../sdk/work/wxsqlite3/wxsqlite3.o.d] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Documents and Settings/stefano/Desktop/MyProject/sdk/wxqslite3'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
1 errors, 0 warnings, total time: 00:00:11 seconds
 
			
					
				Re: Adding search path
				Posted: Fri Sep 10, 2010 10:17 am
				by eranif
				Ok, I still cant see the compilation line...
You will need to build it from command line:
1) Open the file wxsqlite3.cpp inside codelite
2) Right click on the file name (in the tab) and seelct 'Open Shell at File Path'
3) Inside the cmd.exe, navigate to the .workspace directory 
4) type the command:
Code: Select all
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe"  -j 1 -f "MyProject_wsp.mk""
Paste the output here
Eran