I'm using this in my makefile to build my program:
all: server.cpp
g++ -o server server.cpp -I ~/boost/include -L~/boost/lib -Wl,-rpath,~/boost/lib -lboost_system -lboost_thread -DBOOST_ALL_NO_LIB=1
When I compile I get these warnings:
/usr/bin/ld: warning: libboost_system.so.1.53.0, needed by /usr/local/lib/libboost_thread.so, may conflict with libboost_system.so.5
When I run my program I receive the warning :
./server: error while loading shared libraries: libboost_thread.so.1.53.0: cannot open shared object file: No such file or directory
the -Wl/rpath command is not working for me at the moment. I have also tired using
export LD_LIBRARY_PATH=~/boost/lib
before I run my program and I get this back from the terminal:
export: relocation error: export: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
What can I do to specify what library I want to use when I execute the program?