码迷,mamicode.com
首页 > 其他好文 > 详细

./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory

时间:2014-07-21 10:26:43      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:文件   2014   问题   re   c   时间   

时间: 2014-7-20   11:30

地点: andon

问题: 研究xu库文件的创建,编译-链接通过后,执行文件时./ProjectC

        ./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory

         不能打开动态链接库

解决:makefile文件中,库文件 libProjectC.so已经添加到./install中,但还是报错

        #lib directory
         LIBDIR = -L ./
         LIBDIR = -L ../install

         #lib which the link program need
         LIBS = $(LIBDIR) -l$(PROJECT)
         LIBS += -lpthread
         LIBS += -lProjectA

         最后发现是/etc/ld.so.conf中未添加路径/root/workspace/Project/install

         include ld.so.conf.d/*.conf
         /usr/local/lib
         /root/workspace/Project/install

         添加路径后,shell:ldconfig

         重新编译即可成功

./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory,布布扣,bubuko.com

./ProjectC: error while loading shared libraries: libProjectC.so: cannot open shared object file: No such file or directory

标签:文件   2014   问题   re   c   时间   

原文地址:http://www.cnblogs.com/lvchunhao/p/3856024.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!