Page 1 of 1

Linker options not recognized ?

Posted: Thu Mar 04, 2010 7:20 pm
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)

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 7:58 pm
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 [...].

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 8:02 pm
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.

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 8:16 pm
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.

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 8:37 pm
by HJarausch
Thanks,

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

Thanks,
Helmut.

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 8:55 pm
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

Re: Linker options not recognized ?

Posted: Thu Mar 04, 2010 9:05 pm
by HJarausch
Many thanks,
that looks like the solution I was looking for!
Helmut.