I have a problem.

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
Ninja
Posts: 2
Joined: Sun Oct 02, 2005 12:51 am

I have a problem.

Post 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]
Please don't touch my throwing star wound...
MikeR
Posts: 767
Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:

Post by MikeR »

What is the problem you are having?
(aside from "int_tmain()"? should just be int main() )
If it exists in the real world, it can be created in 3d

Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Ninja
Posts: 2
Joined: Sun Oct 02, 2005 12:51 am

Post 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?
Please don't touch my throwing star wound...
WToma
Posts: 70
Joined: Tue Aug 09, 2005 8:38 am
Location: Szeged, Hungary

Post 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]
"This is not a bug, this is a feature!"
Post Reply