Irrnet lite lnk2019 error

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ekuznets
Posts: 3
Joined: Sat Nov 08, 2014 4:04 am

Irrnet lite lnk2019 error

Post by ekuznets »

I am trying to install library for irr net lit but when I link library and include the folder, I got multiple of this errors "error LNK2019: unresolved external symbol".
How this should be fixed?

Thanks for helping.
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrnet lite lnk2019 error

Post by CuteAlien »

Welcome to the forum.

When you ask for help please always post the complete error, never ever throw away part of the message (like in this case the information _which_ symbol this is about). Errors are already minimal, if you don't post them completely then you only make it harder for other people to help you.

Linking a library is not the same as including the header. Headers and include path troubles are about compiling, once you get linker errors like here, then the compiling is already done. It mean it's missing the implementation (not the header, it found that). In the case of a library it generally means you have to add the .lib file (or .a file on Unix) to the linker. Which IDE are you using?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ekuznets
Posts: 3
Joined: Sat Nov 08, 2014 4:04 am

Re: Irrnet lite lnk2019 error

Post by ekuznets »

Ok so,

1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>irrNetLite.lib(SPacket.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)" (__imp_??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) referenced in function "public: void __thiscall irr::net::SInPacket::operator>>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (??5SInPacket@net@irr@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "public: virtual __thiscall std::logic_error::~logic_error(void)" (??1logic_error@std@@UAE@XZ)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) referenced in function "protected: static void __cdecl std::vector<struct irr::net::CNetManager::SPeerData *,class std::allocator<struct irr::net::CNetManager::SPeerData *> >::_Xlen(void)" (?_Xlen@?$vector@PAUSPeerData@CNetManager@net@irr@@V?$allocator@PAUSPeerData@CNetManager@net@irr@@@std@@@std@@KAXXZ)
1>irrNetLite.lib(CNetManager.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (__imp_?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@QAEHPBDH@Z) referenced in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<<struct std::char_traits<char> >(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z)
1>C:\Users\Jenya\Desktop\zalupa\Networking\Debug\Networking.exe : fatal error LNK1120: 5 unresolved externals


This is full log of error as you asked.
Sorry I new to all this(programming also), I am using visual studio express 2010 on Win 7
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrnet lite lnk2019 error

Post by CuteAlien »

I'm not really familiar with irrnet lite, but on first view this looks like you might compile the lib and your application with different standard library settings.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ekuznets
Posts: 3
Joined: Sat Nov 08, 2014 4:04 am

Re: Irrnet lite lnk2019 error

Post by ekuznets »

Ok then, How to make it properly work?
thanhle
Posts: 325
Joined: Wed Jun 12, 2013 8:09 am

Re: Irrnet lite lnk2019 error

Post by thanhle »

It's a link error. You should try search on google on how to fix it. They will show you how to do it.

Goodluck learning,
thanh
CuteAlien
Admin
Posts: 9652
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrnet lite lnk2019 error

Post by CuteAlien »

Sorry, I'm not on Windows currently so can't check the exact option in VS. It's some option where you can chose between stuff like multithreaded debug dll. The option is probably named something like standard library settings or system library, or c-lib settings, don't really know right now without having it in front of me. I don't know the option you need exactly here (depends on your project and that lib, both of which I don't know anything about). If you have the project file of the lib then compare what it does use and use the same.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Re: Irrnet lite lnk2019 error

Post by BlindSide »

I believe CuteAlien is right.

"For the C-runtime go to the project settings, choose C/C++ then 'Code Generation'. Change the 'runtime library' setting to 'multithreaded' instead of 'multithreaded dll'."

From: http://stackoverflow.com/questions/3739 ... press-2005

Try both options 'multithreaded' and 'multithreaded dll', I forgot which one should work.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply