【问题标题】:Linking shared object library to Eclipse (Oxygen)将共享对象库链接到 Eclipse (Oxygen)
【发布时间】:2018-04-01 09:43:40
【问题描述】:

我有一个从命令行(不在 Eclipse 中)创建的共享对象库(.so 文件)。我想在我的 C++ 项目中使用它。我已经在Project -> Properties -> C/C++ Build -> Settings -> Cross G++ Linker -> Libraries 中正确设置了库目录和库名。我的项目可以正确编译并生成二进制文件。但是当我尝试运行它时,它给了我以下错误。

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

我的库目录设置正确。还需要什么?

【问题讨论】:

    标签: c++ eclipse .so


    【解决方案1】:

    我通过在调试配置 -> 环境中设置 LD_LIBRARY_PATH 使其工作。描述于Cannot open shared object file: No such file or directory; Running or Debugging in Eclipse

    【讨论】:

      猜你喜欢
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-21
      相关资源
      最近更新 更多