News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How to pass -Wl,--rpath=$ORIGIN/blabla/ to the linker

Started by oBFusCATed, May 28, 2013, 07:02:30 PM

Previous topic - Next topic

oBFusCATed

Is this currently possible?
From what I've tried I can conclude that it isn't, because CB tries to replace the $ORIGIN with the value of the env var ORIGIN.
Can I disable this just for this case?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Alpha

Try -Wl,--rpath=$$ORIGIN/blabla/.  I think that worked for me last time (but I am not sure if it currently works).

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna


oBFusCATed

OK, so double '\' + tripple '$' is the only string that works :)
Can we make it better?
Anyone care to explain why all those characters are needed?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Jenna

This gives a little description:
http://stackoverflow.com/questions/230364/how-to-get-rpath-with-origin-to-work-on-codeblocks-gcc

It has to do with macro-replacement and shell escaping.

And as one of the posters there wrote:
Quote from: http://stackoverflow.com/questions/230364/how-to-get-rpath-with-origin-to-work-on-codeblocks-gccWhoever decided to make the token $ORIGIN is an evil bastard who deserves a special place in programmer hell.

That we need to triple the $-sign might be a change in our code.