【问题标题】:Linking error while ICE project compilationICE 项目编译时出现链接错误
【发布时间】:2019-04-20 14:58:42
【问题描述】:

在 Ubuntu 14.04 上编译我的项目时出现以下错误:

/usr/bin/ld: /tmp/ccpU0kVX.o: undefined reference to symbol '_ZN7IceUtil19NullHandleExceptionC1EPKci'
//usr/lib/x86_64-linux-gnu/libIceUtil.so.36: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

使用命令编译 ICE 项目时:

g++ -I. server.cpp -lIce -lpthread

这可能是链接的一些问题,但我无法弄清楚。

【问题讨论】:

    标签: compilation linker ice


    【解决方案1】:

    使用 Ice 3.6,您需要链接 Ice 和 IceUtil:

    g++ -o server server.cpp -pthread -lIce -lIceUtil
    

    https://doc.zeroc.com/ice/3.6/ice-release-notes/using-the-linux-binary-distributions#id-.UsingtheLinuxBinaryDistributionsv3.6-C++

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-14
      • 1970-01-01
      • 1970-01-01
      • 2016-03-25
      • 1970-01-01
      • 2013-03-04
      相关资源
      最近更新 更多