Add class to scene manager
Posted: Sun Oct 15, 2023 11:17 am
I'm having massive problems simply trying to add a new class into the scene manager.
I have literally tried dozens of different ways of doing it and still nothing works.
All I get is some stupid error message that makes no sense at all from VS.
Hopefully someone on this forum can help me out and show me how I went wrong.....
I have a working (from older irrlicht) code with the header and cpp file with new class I want to add into the scene manager.
I want it to compile first (which refuses to do so for unknown reasons).
For SceneManager.h - I added into line 35 a new class - "class CCloudSceneNode;" and included "# include CCloudSceneNode.h"
For SceneManager.cpp - I added into line 222 this:
CCloudSceneNode* cloudLayer1 = new CCloudSceneNode(this->getRootSceneNode(), this);
cloudLayer1->setTranslation(core::vector2d<f32>(0.008f, 0.0f));
cloudLayer1->getMaterial(0).setTexture(0, Driver->getTexture("../../../media/clouds/cloud01.png"));
cloudLayer1->setCloudHeight(0.5f, 0.1f, -0.05f);
No matter what, it refuses to compile and currently getting this error:
flaceLib.lib(CSceneManager.obj) : error LNK2019: unresolved external symbol "public: __cdecl irr::scene::CCloudSceneNode::CCloudSceneNode(class irr::scene::ISceneNode *,class irr::scene::ISceneManager *,int)" (??0CCloudSceneNode@scene@irr@@QEAA@PEAVISceneNode@12@PEAVISceneManager@12@H@Z) referenced in function "public: __cdecl irr::scene::CSceneManager::CSceneManager(class irr::video::IVideoDriver *,class irr::io::IFileSystem *,class irr::gui::ICursorControl *,class irr::scene::IMeshCache *,class irr::gui::IGUIEnvironment *)" (??0CSceneManager@scene@irr@@QEAA@PEAVIVideoDriver@video@2@PEAVIFileSystem@io@2@PEAVICursorControl@gui@2@PEAVIMeshCache@12@PEAVIGUIEnvironment@82@@Z)
C:\src_2023\OCC_tryClouds\win32player\x64\Release\win32player.exe : fatal error LNK1120: 1 unresolved externals
Can someone please suggest fixes for this ? - its driving me nuts.....
Files attached.
https://easyupload.io/ahogx9
I have literally tried dozens of different ways of doing it and still nothing works.
All I get is some stupid error message that makes no sense at all from VS.
Hopefully someone on this forum can help me out and show me how I went wrong.....
I have a working (from older irrlicht) code with the header and cpp file with new class I want to add into the scene manager.
I want it to compile first (which refuses to do so for unknown reasons).
For SceneManager.h - I added into line 35 a new class - "class CCloudSceneNode;" and included "# include CCloudSceneNode.h"
For SceneManager.cpp - I added into line 222 this:
CCloudSceneNode* cloudLayer1 = new CCloudSceneNode(this->getRootSceneNode(), this);
cloudLayer1->setTranslation(core::vector2d<f32>(0.008f, 0.0f));
cloudLayer1->getMaterial(0).setTexture(0, Driver->getTexture("../../../media/clouds/cloud01.png"));
cloudLayer1->setCloudHeight(0.5f, 0.1f, -0.05f);
No matter what, it refuses to compile and currently getting this error:
flaceLib.lib(CSceneManager.obj) : error LNK2019: unresolved external symbol "public: __cdecl irr::scene::CCloudSceneNode::CCloudSceneNode(class irr::scene::ISceneNode *,class irr::scene::ISceneManager *,int)" (??0CCloudSceneNode@scene@irr@@QEAA@PEAVISceneNode@12@PEAVISceneManager@12@H@Z) referenced in function "public: __cdecl irr::scene::CSceneManager::CSceneManager(class irr::video::IVideoDriver *,class irr::io::IFileSystem *,class irr::gui::ICursorControl *,class irr::scene::IMeshCache *,class irr::gui::IGUIEnvironment *)" (??0CSceneManager@scene@irr@@QEAA@PEAVIVideoDriver@video@2@PEAVIFileSystem@io@2@PEAVICursorControl@gui@2@PEAVIMeshCache@12@PEAVIGUIEnvironment@82@@Z)
C:\src_2023\OCC_tryClouds\win32player\x64\Release\win32player.exe : fatal error LNK1120: 1 unresolved externals
Can someone please suggest fixes for this ? - its driving me nuts.....
Files attached.
https://easyupload.io/ahogx9