error LNK2001: unresolved external symbol

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
Distorion
Posts: 12
Joined: Thu Jul 19, 2012 1:58 am
Location: Canberra, Australia

error LNK2001: unresolved external symbol

Post by Distorion »

Hey guys, Iam new to the engine and iam encountering the follow Errors:

Code: Select all

 
1>------ Build started: Project: Irrlicht3D_Engine, Configuration: Debug Win32 ------
1>  C_Model.cpp
1>C_Model.obj : error LNK2001: unresolved external symbol "public: static class irr::scene::ISceneManager * C_App::smgr" (?smgr@C_App@@2PAVISceneManager@scene@irr@@A)
1>C_OnInit.obj : error LNK2019: unresolved external symbol "public: static class irr::scene::ISceneManager * C_App::smgr" (?smgr@C_App@@2PAVISceneManager@scene@irr@@A) referenced in function "public: bool __thiscall C_App::C_OnInit(void)" (?C_OnInit@C_App@@QAE_NXZ)
1>C_OnRender.obj : error LNK2001: unresolved external symbol "public: static class irr::scene::ISceneManager * C_App::smgr" (?smgr@C_App@@2PAVISceneManager@scene@irr@@A)
1>C:\Users\thorn\Documents\Visual Studio 2010\Projects\Irrlicht3D_Engine\Debug\Irrlicht3D_Engine.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
I think iam linking everything properly thou iam not sure.
Any help would be greatly Apreciated Thank you!
CuteAlien
Admin
Posts: 9721
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: error LNK2001: unresolved external symbol

Post by CuteAlien »

Welcome to the engine. If you need help please also always write what it is you are actually doing/trying. The unresolved externals error means the linker does not have the implementations of those functions. And it tells you the name - probably some class called C_APP and some 2PAVISceneManager (or maybe without the 2). So you have to add those files implementing that stuff to your project - either as .cpp file or as .obj file or als .lib.
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
Distorion
Posts: 12
Joined: Thu Jul 19, 2012 1:58 am
Location: Canberra, Australia

Re: error LNK2001: unresolved external symbol

Post by Distorion »

Thanks for the help CuteAlien, I fixed it i forgot to declare a static variable its working now thank you for your help anyway.:)
Post Reply