error while loading shared libraries
Greetings all,
I first created a class for a library like this:
library.h:
class Library
{
public:
Library() { };
~Library() { };
void testLib();
};
library.cpp:
#include "library.h"
#include
AMDG ChristinaDRS wrote:
now when I try to compile main.cpp like this:
$ g++ -I ~/boost_1_38_0/ -I. main.cpp -o main -L/usr/local/lib/ -L. -ltest -lboost_thread-gcc41-
now when I run main:
$ ./main ./main: error while loading shared libraries: libboost_thread-gcc41-mt-1_38.so.1.38.0: cannot open shared object file: No such file or directory
I get that error.
Can anyone explain why?
Try adding /usr/local/lib to LD_LIBRARY_PATH In Christ, Steven Watanabe
participants (2)
-
ChristinaDRS
-
Steven Watanabe