I've got this problem:
when i build the project i have
fps_gamelevel.obj : error LNK2001: unresolved external symbol "public: class irr::scene::ISceneManager * __thiscall fps_manager::getSceneManager(void)" (?getSceneManager@fps_manager@@QAEPAVISceneManager@scene@irr@@XZ)
Fps-Release\Fps-Game.exe : fatal error LNK1120: 1 unresolved externals
a linker error!!!
it not find the pointer or something similar...
the important piece of code is:
Code: Select all
bool fps_gamelevel::loadlevel(fps_manager* p_manager,const irr::c8 *meshname, irr::core::vector3df position)
{
m_plevelmesh = p_manager->getSceneManager()->getMesh(meshname);
m_plevelnode = 0;
if (m_plevelmesh)
m_plevelnode = p_manager->getSceneManager()->addOctTreeSceneNode(m_plevelmesh->getMesh(0));
m_plevelselector = 0;
if (m_plevelnode)
{
m_plevelnode->setPosition(position);
m_plevelselector = p_manager->getSceneManager()->createOctTreeTriangleSelector(
m_plevelmesh->getMesh(0), m_plevelnode, 128);
m_plevelnode->setTriangleSelector(m_plevelselector);
m_plevelselector->drop();
}
flag=true;
return flag;
};
Code: Select all
#include "fps_manager.h"
//! Costruttore
fps_manager::fps_manager()
{
CreateDevice();
Init();
}
//! Distruttore
fps_manager::~fps_manager()
{
}
//! Crea il device e prende gli altri puntatori fondamentali
void fps_manager::CreateDevice()
{
m_pDevice=createDevice(EDT_DIRECT3D9,
core::dimension2d<s32>(640, 480), 32, false, false, true, 0);
m_pDriver = m_pDevice->getVideoDriver();
m_pSceneManager = m_pDevice->getSceneManager();
m_pGUIEnvironment = m_pDevice->getGUIEnvironment();
}
//! Ritorna un puntatore al device
inline IrrlichtDevice* fps_manager::getDevice()
{
return m_pDevice;
}
//! Ritorna un puntatore al driver
inline IVideoDriver* fps_manager::getDriver()
{
return m_pDriver;
}
//! Ritorna un puntatore allo SceneManager
inline ISceneManager* fps_manager::getSceneManager()
{
return m_pSceneManager;
}
//! Ritorna un puntatore al GuiEnvironment
IGUIEnvironment* fps_manager::getGUIEnvironment()
{
return m_pGUIEnvironment;
}
//! Inizializzazione del manager
void fps_manager::Init()
{
this->getDriver();
};