Adding search path
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Adding search path
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!
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!
You do not have the required permissions to view the files attached to this post.
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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
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:
Code: Select all
../sqlite3
"Entering directory /some/path"
this should give you a hint where is the current working directory is.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
Hi Eran,
I still get the error
My Compiler additional search path is
.;../../sdk/sqlite3;../sqlite3
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
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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
Settings -> Build Settings -> Build System and reduce the 'No. of concurrent jobs' to 1
Post here the output again
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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
----------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
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
Can you send over the project zipped (attach it to this thread)?
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
Here it is!
You do not have the required permissions to view the files attached to this post.
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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
Try to re-build and paste the output here
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Guru
- Posts: 352
- Joined: Sun Nov 29, 2009 7:36 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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
CodeLite 15.x
CodeLite is awesome, I just Love it!
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Adding search path
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:
Paste the output here
Eran
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""
Eran
Make sure you have read the HOW TO POST thread