Can I have a custom rpath in an ELF Executable?

  .so, c++, rpath, shared-libraries

I was messing around with CMake and shared libraries and I found out that my test executable would only find my shared libraries in their build directory. That’s a bit annoying… I’d like that the executable only search them in its own directory. I’ve already tried several things (Did I do them correctly ?)

  • Modifying the binary after compilation
  • Using rpath tag in G++/CMAKE

None of these seems to work.

Source: Windows Questions C++

LEAVE A COMMENT