Compilation ICE项目编译时发生链接错误

Compilation ICE项目编译时发生链接错误,compilation,linker,ice,Compilation,Linker,Ice,在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

在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


这可能是链接中的一些问题,但我无法解决。

对于Ice 3.6,您需要使用Ice和IceUtil进行链接:

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