How do I get rid of LD_LIBRARY_PATH at run-time?

后端 未结 7 1360
温柔的废话
温柔的废话 2021-02-14 10:25

I am building a C++ application that uses Intel\'s IPP library. This library is installed by default in /opt and requires you to set LD_LIBRARY_PATH both for compil

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-14 11:02

    As suggested by Richard Pennington, the missing library is not used directly by my application, but it is used by the shared libraries I use. Since I cannot recompile IPP, the solution to my problem is to add -liomp5 when compiling, using the -R option for the linker. This actually adds the rpath for libiomp5.so fixing the problem!

提交回复
热议问题