Hi,
I'd like to specify some libraries/include directives that should be included in every project.
(It's for a programming course for beginners in C++).
How can this be done.
(Codelite 2.2.0.3681 on GenToo Linux - built from source)
Configuring Default Libraries/Include Directives
-
- CodeLite Veteran
- Posts: 98
- Joined: Thu Feb 18, 2010 10:54 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configuring Default Libraries/Include Directives
You can only add a global include directives. This can be done from the menu: Settings > Build Settings > Compilers, Select your compiler, and then select the 'Advanced' pageHJarausch wrote:I'd like to specify some libraries/include directives that should be included in every project.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 98
- Joined: Thu Feb 18, 2010 10:54 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configuring Default Libraries/Include Directives
Thanks!
I've tried to put
/usr/local/lib -lMatrix
into the Libraries Path: field.
Unfortunately this generates
"-L /usr/local/lib -lMatrix"
without the quotation marks this would be fine.
Is it difficult to change that.
I need several libraries to linked in and I don't want my students to type them all in.
Thanks for a hint,
Helmut.
I've tried to put
/usr/local/lib -lMatrix
into the Libraries Path: field.
Unfortunately this generates
"-L /usr/local/lib -lMatrix"
without the quotation marks this would be fine.
Is it difficult to change that.
I need several libraries to linked in and I don't want my students to type them all in.
Thanks for a hint,
Helmut.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configuring Default Libraries/Include Directives
The quotation marks are there for a reason: on windows there can be space in the paths.
Like I said: you can add path but not libraries.
Eran
Like I said: you can add path but not libraries.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Veteran
- Posts: 98
- Joined: Thu Feb 18, 2010 10:54 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configuring Default Libraries/Include Directives
I have 2 questions, though.
How set a path with more than 1 component?
With project-settings Linker
To specify more than one library does work but is tricky
One has to say
Lib1 -lLib2
since the '-l1' is preprended to the whole string.
Or did I miss something?
How set a path with more than 1 component?
With project-settings Linker
To specify more than one library does work but is tricky
One has to say
Lib1 -lLib2
since the '-l1' is preprended to the whole string.
Or did I miss something?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configuring Default Libraries/Include Directives
To add multiple libraries, simply add them as a semi-colon delimited list in the project settings -> Linker -> libraries:
this will be converted into:
The same thing for adding search paths:
Codelite will convert it to:
Eran
Code: Select all
my_lib1;my_lib2;my_lib3
Code: Select all
-lmy_lib1 -lmy_lib2 -lmy_lib3
Code: Select all
/path/one;/path/two;...
Code: Select all
-L"/path/one" -L"/path/two"
Make sure you have read the HOW TO POST thread