Help 4 the first tutorial

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
k_kolibri_7
Posts: 6
Joined: Tue Jun 26, 2007 8:15 pm

Help 4 the first tutorial

Post by k_kolibri_7 »

Hi folks.

I made the first Tutorial.
I use Microsoft Visual Studio C++ 2005 Express Edition.
When I compile, there's an error that irrlight.dll couldn't be found.
The path for the irrlicht.lb is the right one, can anyone help me, please?

#include <irrlicht.h>

using namespace irr;

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

#pragma comment(lib, "C:/Dokumente und Einstellungen/Administrator/Desktop/Jans Zeugs/engines/irrlicht-1.3.1/irrlicht-1.3.1/lib/Win32-visualstudio/Irrlicht.lib")


int main()
{

//Start IrrLicht Device
IrrlichtDevice *device = createDevice(EDT_SOFTWARE, dimension2d<s32>(512, 384), 16, false, false, false, 0);

//FEnstertitel
device->setWindowCaption(L"Hallo Welt! - Irrlicht Engine Demo (Titel)");

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

//Feld
guienv->addStaticText(L"Hello World! This is the Irrlicht Software engine!", rect<int>(10,10,200,22), true);

//Modell anzeigen
IAnimatedMesh* mesh = smgr->getMesh("C:/Dokumente und Einstellungen/Administrator/Desktop/Jans Zeugs/engines/irrlicht-1.3.1/irrlicht-1.3.1/media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

if (node)
{
//dynamic Light deaktivieren
node->setMaterialFlag(EMF_LIGHTING, false);

//zwischen Frame 0 und 310 abspielen
node->setFrameLoop(0, 310);

//Mesh zuweisen
node->setMaterialTexture( 0, driver->getTexture("C:/Dokumente und Einstellungen/Administrator/Desktop/Jans Zeugs/engines/irrlicht-1.3.1/irrlicht-1.3.1/media/sydney.bmp") );
}

//Kameraplatzieren auf 0/30/-40
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();

}

//Objekt verschwinden lassen
device->drop();
return 0;

}
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

you need to copy the irrlicht.dll in to the target directory.
Rytz
Posts: 249
Joined: Wed Oct 25, 2006 6:05 am
Location: IL, USA
Contact:

Re: Help 4 the first tutorial

Post by Rytz »

k_kolibri_7 wrote:Hi folks.

I made the first Tutorial.
I use Microsoft Visual Studio C++ 2005 Express Edition.
When I compile, there's an error that irrlight.dll couldn't be found.
The path for the irrlicht.lb is the right one, can anyone help me, please?
Is the irrlicht.dll in a set visible path such as Windows\System32? It needs to be in a set visible path or in the same directory as the EXE file that you are trying to run.
Image
k_kolibri_7
Posts: 6
Joined: Tue Jun 26, 2007 8:15 pm

Post by k_kolibri_7 »

Thanks for your replies.

So i don't need to write the thing with irrLight.lib, I just have to copy the dll?
Where can I find it?
Rytz
Posts: 249
Joined: Wed Oct 25, 2006 6:05 am
Location: IL, USA
Contact:

Post by Rytz »

k_kolibri_7 wrote:Thanks for your replies.

So i don't need to write the thing with irrLight.lib, I just have to copy the dll?
Where can I find it?
You compile your project with it setup for the compiler to point to the library (lib / dll).

You run the program with the DLL in the same path or in a set path.

The DLL is included in the SDK.
Image
k_kolibri_7
Posts: 6
Joined: Tue Jun 26, 2007 8:15 pm

Post by k_kolibri_7 »

thanks, it works now!
Post Reply