【问题标题】:Build error in building of a project has the INET reference项目构建中的构建错误具有 INET 参考
【发布时间】:2021-09-11 01:33:41
【问题描述】:

我想模拟一个包含 INET 引用的项目,但产生了以下错误。如何解决?

.
.
.
Creating executable: ../out/clang-debug/src/D2DCommunication_dbg
/usr/bin/ld: cannot find -lINET_dbg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../out/clang-debug/src/D2DCommunication_dbg] Error 1
Makefile:109: recipe for target '../out/clang-debug/src/D2DCommunication_dbg' failed
make[1]: Leaving directory '/home/reza/omnetpp/omnetpp-5.6.1/samples/D2DCommunication/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.

19:24:15 Build Failed. 5 errors, 2 warnings. (took 6s.698ms)

【问题讨论】:

  • 能否检查一下libINET_dbg.so 是否存在于INET 目录的src 中?
  • 如何查看?(通过菜单)。其他一些依赖于Inet的项目,编译构建没有问题。
  • 检查文件是否存在的方法有很多种。例如,打开控制台,进入有 INET 的目录,进入 src,输入 ls -al。或者打开图形资源管理器,将目录更改为您的 INET,转到 src 并检查您是否可以看到所需的文件。你可以使用find 命令...
  • 我检查了 Inet 目录中的 src 文件夹,libINET.so 可用。问题应该存在于 D2DCommunication 项目中。
  • 你能检查libINET_dbg.so是否存在吗?

标签: c++ omnet++


【解决方案1】:

看来你已经在发布模式下构建了 INET,而引用 INET 的项目是在调试模式下构建的。但是,这两个项目必须以相同的模式构建。
假设您需要调试模式,在 Eclipse 中右键单击 INET,选择Build Configurations,然后选择Set Active,然后选择gcc-debugdebug

【讨论】:

    猜你喜欢
    • 2014-12-26
    • 2019-08-02
    • 2011-05-22
    • 2020-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-24
    • 1970-01-01
    相关资源
    最近更新 更多