Re: [Rd] could not open

From: Simon Urbanek <>
Date: Thu 02 Jun 2005 - 22:39:09 GMT

On Jun 2, 2005, at 5:52 PM, Tib wrote:

> Now I use this to compile my program
> g++ engine.cpp -o engine -lm -lRmath -I/Users/tib/R/lib/R/include/
> -L/Users/tib/R/bin/
> it did not report any error, however as I executed the program
> ./engine
> it reported:
> ./engine: error while loading shared libraries: cannot
> open shared object file: No such file or directory
> Why did it report this error but compile through?

Because you specified the path to the library for the compiler (-L/ Users/tib/R/bin/), but failed to do so at runtime. Something like export LD_LIBRARY_PATH=/Users/tib/R/bin/ should do the trick, usually [I'm assuming you have in / Users/tib/R/bin].

Simon mailing list Received on Fri Jun 03 08:41:03 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:26:57 GMT