Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
#pragma comment(lib, "Irrlicht.lib")
int main()
{
IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<s32>(640, 480), 16, false, false, false, 0);
device->setWindowCaption(L"Hello World! - Irrlich Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Hello World! This is the Irrlicht Software engine!", rect<int>(10,10,200,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode(mesh);
if(node);
{
node->setMaterialFlag(EMF_LIGHTING,false);
node->setFrameLoop(0,310);
node->setMaterialTexture(0,driver->getTexture("../../media/sydney.md2"));
}
smgr->addCameraSceneNode(0,vector3df(0,30,-40),vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
device->drop();
return 0;
}
That generates this spew:
Code: Select all
Linking...
Main.obj : error LNK2019: unresolved external symbol "class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,class irr::IEventReceiver *,wchar_t const *)" (?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PB_W@Z) referenced in function _main
C:\Documents and Settings\Mooncabbage\My Documents\Visual Studio 2005\Projects\Project1\Debug\Hello World.exe : fatal error LNK1120: 1 unresolved externals