Archived
This forum has been archived. Please start a new discussion on GitHub.
Unresolved external symbol error at linking
in Help Center
Hi, I need your help.
I have a very large Qt project for hosts' system monitoring, singnal processing of server hardware and etc. Now I want to refuse use of SNMP and FTP and replace it by ICE.
There are no problem to use ICE with Microsoft Visual Studio + Your AddIn. But not everything is so good with Qt (Microsoft Visual Studio (x86) compiler, not minGW).
I can't compile and link small ICE project (hello world) because of unresolved external symbol error at linking like this:
What can I do to proper linking ice libraries?
Regards,
Aleksey Blokhin
P.S: And sorry for my bad English, it's not my native language
I have a very large Qt project for hosts' system monitoring, singnal processing of server hardware and etc. Now I want to refuse use of SNMP and FTP and replace it by ICE.
There are no problem to use ICE with Microsoft Visual Studio + Your AddIn. But not everything is so good with Qt (Microsoft Visual Studio (x86) compiler, not minGW).
I can't compile and link small ICE project (hello world) because of unresolved external symbol error at linking like this:
moc_iceclient.obj:-1: error: LNK2001: unresolved external symbol ""public: virtual __thiscall IClient::IceClient::~IceClient(void)" (??1IceClient@IClient@@UAE@XZ)" iceclient.obj:-1: error: LNK2019: unresolved external symbol reference "class IceProxy::Ice::Object * __cdecl IceProxy::Server::upCast(class IceProxy::Server::AbstractServer *)" (?upCast@Server@IceProxy@@YAPAVObject@Ice@2@PAVAbstractServer@12@@Z) в функции "public: __thiscall IceInternal::ProxyHandle<class IceProxy::Server::AbstractServer>::ProxyHandle<class IceProxy::Server::AbstractServer>(class IceProxy::Server::AbstractServer *)" (??0?$ProxyHandle@VAbstractServer@Server@IceProxy@@@IceInternal@@QAE@PAVAbstractServer@Server@IceProxy@@@Z) iceclient.obj:-1: error: LNK2001: unresolved external symbol ""private: virtual class IceInternal::Handle<class IceDelegateD::Ice::Object> __thiscall IceProxy::Server::AbstractServer::__createDelegateD(void)" (?__createDelegateD@AbstractServer@Server@IceProxy@@EAE?AV?$Handle@VObject@Ice@IceDelegateD@@@IceInternal@@XZ)" and etc...I include ice.lib and iceutil.lib different ways:
*.pro: win32 { CONFIG(debug, debug|release): LIBS += "C:/Ice-3.5.0/lib/iced.lib" \ "C:/Ice-3.5.0/lib/iceutild.lib" else: CONFIG(release, debug|release): LIBS += "C:/Ice-3.5.0/lib/ice.lib" \ "C:/Ice-3.5.0/lib/iceutil.lib" }
*.pro: win32:CONFIG(release, debug|release): LIBS *= -LC:/Ice-3.5.0/lib/ -lice -liceutil else:win32:CONFIG(debug, debug|release): LIBS *= -LC:/Ice-3.5.0/lib/ -liced -liceutild
*.h: #pragma comment (lib,"C:/Ice-3.5.0/lib/iced.lib") #pragma comment (lib,"C:/Ice-3.5.0/lib/iceutild.lib")But unresolved symbol errors remain...
What can I do to proper linking ice libraries?
Regards,
Aleksey Blokhin
P.S: And sorry for my bad English, it's not my native language
0
Comments
-
Hi,
The linker errors point to missing symbols which aren't symbols from the Ice library:IClient::IceClient::~IceClient(void) IceProxy::Server::upCast(class IceProxy::Server::AbstractServer *) IceProxy::Server::AbstractServer::__createDelegateD(void)
Did you perhaps simply forget to add the object(s) for the code generated by the Slice compiler?
Cheers,
Benoit.0 -
OMG! Really! Now it works! So much sleepless nights because of it... I just included slice-generated file by #include "abstractserver.h", while it was at the subdir and wasn't found (it's a mystery for me why it wasn't error that file just wasn't found).
Benoit, thanks a lot for ur help!0