I\'m trying to link an RPATH containing the special string $ORIGIN into an executable built using GCC with the Code::Blocks IDE. I\'ve specified
-Wl,-R$ORIGI
In addition to kblucks answer that addresses the question for Code:Blocks.... For those like me who stumbled across this page looking for how to do this with Make. The trick is to use an extra $ sign as an escape character and to enclose it with quotes:
-Wl,-R,'$$ORIGIN/../lib'
Full explanation can be had here: Using ORIGIN for a dynamic runtime library search path