Linker options not recognized ?

General questions regarding the usage of CodeLite
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Linker options not recognized ?

Post by HJarausch »

Hi,

using Settings -> Build Settings -> Linker options (under gnu g++)
I've entered a new option

-rpath /mylib

This new option and the other options predefined there (-s -fopenmp) don't show
in the linker command when I build the project.

What am I missing?

Many thanks for a hint,
Helmut.

(This is under Linux)
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Linker options not recognized ?

Post by jfouche »

What you did is add a new linker option available in your project settings. You can apply it in your project right clicking on your project, in the Workspace view -> Settings -> Linker Options [...].
Jérémie
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Linker options not recognized ?

Post by HJarausch »

Oh yes, I see.

But how can I set such an option globally?
I'd like to use it in a C++ programming course and I don't want to force every student to add
this option to each of his projects.
Is there a means to achieve this?

Many thanks,
Helmut.
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Linker options not recognized ?

Post by jfouche »

This is exactly what you've done : You added for all g++ based project a linker option. The Settings -> Build Settings are globals one, and will now be available for all your projects.
Jérémie
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Linker options not recognized ?

Post by HJarausch »

Thanks,

it might be available but it's not used unless specified explicitly.
Is this possible?

Thanks,
Helmut.
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: Linker options not recognized ?

Post by frank_frl »

You could create a new project with the necessary compiler / linker settings and save this as template. Now, when creating the projects for your students, just use this template as start ;)

Frank
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Linker options not recognized ?

Post by HJarausch »

Many thanks,
that looks like the solution I was looking for!
Helmut.
Post Reply