PDA

View Full Version : [C++]Problema con Irrlicht


Raiki
18-02-2009, 12:49
Salve:DHo un problema con Irrlicht.Stavo provando a fare il tutorial HelloWord (http://irrlicht.sourceforge.net/docu/example001.html).Però al momento della compilazione mi dà questo errore



http://img12.imageshack.us/img12/4312/screentk5.jpg


Come si può vedere dallo screen come compilatore sto usando Code::Blocks

Il sorgente del programma è riportato qui di sotto

#include <irrlicht.h>

using namespace irr;
using namespace io;
using namespace core;
using namespace video;
using namespace gui;
using namespace scene;

#ifdef _IRR_WINDOWS_
#pragma comment (lib,"Irrlicht.lib")
#pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
#endif

int main(){

IrrlichtDevice *device =
#ifdef _IRR_OSX_PLATFORM_
createDevice(video::EDT_OPENGL, dimension2d<s32>(640,840),16,false,false,false,0);
#else
createDevice(video::EDT_SOFTWARE, dimension2d<s32>(640,840),16,false,false,false,0);
#endif
if(!device) return 1;

device->setWindowCaption(L"HELLO WORLD");

IVideoDriver *driver = device->getVideoDriver();
ISceneManager *smgr = device->getSceneManager();
IGUIEnvironment *guienv = device->getGUIEnvironment();

guienv->addStaticText(L"PROVA DI RENDER",rect<s32>(10,10,260,22), true);

IAnimatedMesh * mesh = smgr->getMesh("../../media/sydney.md2");
if(!mesh) return 1;

IAnimatedMeshSceneNode *node = smgr->addAnimatedMeshSceneNode(mesh);

if(node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation(scene::EMAT_STAND);
node->setMaterialTexture(0,driver->getTexture("../../media/sydney.bmp"));
}

smgr->addCameraSceneNode(0,vector3df(0,30,-40), vector3df(0,5,0));
while(device->run()){
driver->beginScene(true,true,SColor(255,100,101,140));

smgr->drawAll();
guienv->drawAll();

driver->endScene();
}
device->drop();
return 0;
}


Come risolvere questo errore?

Tommo
18-02-2009, 20:38
Dice che un metodo che ha compilato e linkato non esiste nella Dll dove dovrebbe stare, in pratica.

Sei sicuro di aver impostato per bene il progetto?

Raiki
18-02-2009, 21:06
Credo di si visto che ho seguito passo passo il tutorial ufficiale.Ora provo con un copia e incolla per vedere se si verifica ancora l errore

Raiki
18-02-2009, 21:16
Ho risolto da solo grazie lo stesso :D