0

I've finally managed to build my project using eclipse, c++ and boost but when I run the program I get:

~/workspace/HelloWorld/Debug/HelloWorld: error while loading shared libraries: libboost_regex.so.1.54.0: cannot open shared object file: No such file or directory 

Obviously I don't want it to link to such a specific version and if possible don't have shared libraries at all when building the file.

How do I use a more generic name even though I've installed the latest boost manually and/or can or should I link it statically into my binary instead?

2
  • It's quite dangerous to link dynamically with an incorrect library version (i.e. not the one your translation units were compiled with). To link statically, set the appropriate linker flags. Commented Oct 21, 2013 at 14:12
  • I hadn't set LD_LIBRARY_PATH and when I did it once the cache got it... Static linking would help... thanks Commented Oct 22, 2013 at 6:08

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.