zoukankan      html  css  js  c++  java
  • linux下项目开发加载动态库:ldconfig与 /etc/ld.so.conf

    场景:自己开发一个项目,程序里包含一些自定义动态库。运行,需要加载这些动态库。

    假如这些库在/pro/output/lib/下面,可执行程序在/pro/output/bin/下面。

    那么,我们需要:

     [root@linux ~]# vi /etc/ld.so.conf
    include ld.so.conf.d/*.conf
    /pro/output/lib   <==这一行是新增的。

    刷新动态库:

    [root@linux ~]# cd /pro/output/bin
    [root@linux ~]# ldconfig
    # 画面上不会显示任何信息,正常。

    程序启动,就会正常加载了。

  • 相关阅读:
    Git
    Git
    Git
    Git
    Docker
    Linux
    Linux
    Python
    Python
    SQL
  • 原文地址:https://www.cnblogs.com/jiu0821/p/7672430.html
Copyright © 2011-2022 走看看