This is my code:
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>(512, 384), 16,
false, false, false, 0);
device->setWindowCaption(L"Hello World! - Irrlicht 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("C:/Documents and Settings/Carl/Skrivbord/Irrlicht/Kopia av Files/irrlicht-0.9/media/media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, driver->getTexture("C:/Documents and Settings/Carl/Skrivbord/Irrlicht/Kopia av Files/irrlicht-0.9/media/media/sydney.bmp") );
}
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;
}
IF i skip that, I get this out put:We also need the location of irrlicht.lib to be listed, so select the 'Libraries' tab and add the \lib\VisualStudio directory.
If I do what I think is the right thing I get:--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "Irrlicht.lib"
Error executing link.exe.
Cpp1.exe - 1 error(s), 0 warning(s)
BUT... since the dll can't be found, I can't run it--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Skipping... (no relevant changes detected)
Cpp1.cpp
Cpp1.obj - 0 error(s), 0 warning(s)
Any foolprof way to link the dll? In the code itself? (to "link" is the right word?) I don't know that much yet, but I really want to. I'm usually good at finding solutions, but this is just annoying
Thanks in advance!