0

after .so compilation the ldd command returns 3 unknown dependencies. libboost_regex-gcc41-mt-1_35.so.1.35.0 => not found libsqlapi.so => not found libsqlapiu.so => not found Although they are specified in makefile and present at machine (RH 64 bit). LD_LIBRARY_PATH is not set (need a solution without altering it) libMakeMeHappy_so_LDADD = -L/usr/local/lib64/ -lboost_regex-gcc41-mt -lsqlapi -lsqlapiu Any comment why and how to prevent it?

R_N
  • 111
  • 9

1 Answers1

1

Firstly you need to figure out where those missing libraries reside on your machine. They might be in /usr/local/lib64/

Then you can chose one of these 3 options:

  1. Set the LD_LIBRARY_PATH env variable to point to /usr/local/lib64/

  2. Update the global library path:

    • Add /usr/local/lib64/ to /etc/ld.so.conf
    • Run ldconfig
  3. Add /usr/local/lib64/ as a library path to your shared library (or to the executables using your library)

    • Add the linker flag -Wl,-rpath,/usr/local/lib64/ when linking the the shared library or executable.
nos
  • 223,662
  • 58
  • 417
  • 506