Error loading shared libraries of boost

前端 未结 3 1293
梦如初夏
梦如初夏 2020-12-11 08:27

I am working on centos. I installed boost version 1.45.0 on my system. The programs are compiled correctly but whenever I type command to see output it gives following error

3条回答
  •  执笔经年
    2020-12-11 09:07

    In addition to the other answers, you can also set the DT_RPATH elf tag when linking your executable

    -Wl,-rpath,/path/to/boost/libraries -L /path/to/boost/libraries -lboost_whatever
    

    This way you don't have to remember to set your LD_LIBRARY_PATH if the libraries are installed in a non-standard location.

提交回复
热议问题