Page 1 of 1

I have a problem.

Posted: Sun Oct 02, 2005 1:40 am
by Ninja
space gui;

#pragma comment(lib, "Irrlicht.lib")


int _tmain()
{
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("../../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.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;
)
[/code]

Posted: Sun Oct 02, 2005 1:55 am
by MikeR
What is the problem you are having?
(aside from "int_tmain()"? should just be int main() )

Posted: Sun Oct 02, 2005 2:09 am
by Ninja
well, whenever I try to build/run without debugging, it comes up with an error saying:

c:\11111111111111111111\new1\new1.cpp(43): fatal error C1010: unexpected end of file while looking for precompiled header directive



as you can tell this is the mega noob beginners tutorial.

think you could elaborate to why its an error?

Posted: Sun Oct 02, 2005 7:53 am
by WToma
1. I can't see if you've included irrlicht.h.
2. 'space gui' is invaild. You should write 'using namespace gui'.

Code: Select all

using namespace irr;
using namespace core;
using namespace video;
using namespace gui;
3. the last ')' should be '}'

Toma[/code]