I am trying to compile Zeroc ICE demo program.
at the time of linking, i get multiple undefined reference
errors.
/Clock.cpp:71: undefined reference to IceInternal::Outgoing::Outgoing(IceProxy::Ice::Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ice::OperationMode, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)'
I tried the following to diagnose the issue:
Change the order of lib reference in g++ command (source cpp then -l
):
g++ -std=c++11 Clock.cpp -lpthread -lIce -lIceUtil -lIceStorm
but no help.
Further, I tried to see if the referred lib files contain the reported symbols. I ran objdump -TC libIce.so
to see:
00000000001f53d0 g DF .text 000000000000141c Base IceInternal::Outgoing::Outgoing(IceProxy::Ice::Object*, std::string const&, Ice::OperationMode, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const*)
I use g++(GCC) 6.2.0.
Could anyone help please.