TomKo1
TomKo1

Reputation: 224

Linking error while ICE project compilation

While compiling my project on Ubuntu 14.04 I got the following error:

/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

While compiling ICE project with a command:

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

This is propably some problem with linking but I can't figure it out.

Upvotes: 2

Views: 262

Answers (1)

bernard
bernard

Reputation: 23

With Ice 3.6, you need to link with Ice and IceUtil:

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

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

Upvotes: 2

Related Questions