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?

Asken
  • 7,679
  • 10
  • 45
  • 77
  • 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](http://stackoverflow.com/questions/2954387/can-i-mix-static-and-shared-object-libraries-when-linking). – Igor R. Oct 21 '13 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 – Asken Oct 22 '13 at 06:08

0 Answers0