News:

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

Main Menu

using rpath[solved]

Started by leon, April 08, 2008, 05:24:40 PM

Previous topic - Next topic

leon

How do I make code::blocks add an rpath to my binary. I have tried to add -rpath <pathname> in the other linker options box but all I get is a message "g++: unrecognized option '-rpath,'". I have looked through this forum for an answer but most seem to be related to compiling CB itself. Any ideas.
Glass Arcade, Tauntonions
Noli illegitimi carborundum

TDragon

Try "--Wl,-rpath,<pathname>".
[url="https://jmeubank.github.io/tdm-gcc/"]https://jmeubank.github.io/tdm-gcc/[/url] - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

leon

Quote from: TDragon on April 08, 2008, 05:54:03 PM
Try "--Wl,-rpath,<pathname>".
Well thanks that got rid of the error message and compilation completes but the path is still not in the binary. I have checked the path and it is right is there anything else that can interfere with this setting.
Glass Arcade, Tauntonions
Noli illegitimi carborundum

leon

-Wl,--rpath -Wl,<path>

worked for me.
Glass Arcade, Tauntonions
Noli illegitimi carborundum