zrbecker
zrbecker

Reputation: 1582

Having some issues with shared libraries

I am compiling a program for source, and it is not finding some dynamic libraries that are compiled with it. Here is the output when I run the executable. (It compiles fine)

dyld: Library not loaded: libipeqtcanvas.so.7.0.14
  Referenced from: /Users/zrbecker/testipe/bin/./ipe
  Reason: image not found
Trace/BPT trap

My question is, I know -L finds libraries while compiling, but how do I make sure the program can find the libraries when running.

The libraries are located at the relative path ../lib from the executable which is in a bin directory.

Upvotes: 1

Views: 110

Answers (1)

James
James

Reputation: 25533

You can set LD_LIBRARY_PATH (or actually, DYLD_LIBRARY_PATH, since you're on OS X) at runtime to include the library directory.

export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/path/to/lib"

Upvotes: 2

Related Questions