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]
I have a problem.
I have a problem.
Please don't touch my throwing star wound...
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?
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...
1. I can't see if you've included irrlicht.h.
2. 'space gui' is invaild. You should write 'using namespace gui'.
3. the last ')' should be '}'
Toma[/code]
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;
Toma[/code]
"This is not a bug, this is a feature!"