Problem with compileing

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
Kojima Pro
Posts: 15
Joined: Wed Oct 08, 2008 11:29 pm

Problem with compileing

Post by Kojima Pro »

Hello,

I have another problem and tryed fixing this by my self, then tryed google about my problem but i can not find a solution...

but im still on this "Hello World" tutorial and im confused...i typed everything like they said and i get alot of errors, i will not post them because there is 59 of them lol but i will post what i typed and see what i did wrong.

Here it is:

Code: Select all

#include <irrlicht.h>
using namespace irr;

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

#ifdef _IRR_WINDOWS_
#pragma comment (lib, "Irrlicht.lib")
#endif

int main()
{
	IrrlichtDevice *device =
#ifdef _IRR_OSX_PLATFORM_
		createDevice( video::EDT_OPENGL, dimension2d<s32>(640, 480), 16,
			false, false, false, 0);
#else
		createDevice( video::EDT_SOFTWARE, dimension2d<s32>(640, 480), 16,
			false, false, false, 0);
#endif

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 renderer!",
		rect<s32>(10,10,260,22), true);
IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney.md2");
	IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

if (node)
	{
		node->setMaterialFlag(EMF_LIGHTING, false);
		node->setMD2Animation ( scene::EMAT_STAND );
		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(255,100,101,140));

		smgr->drawAll();
		guienv->drawAll();

		driver->endScene();

device->drop();

	return 0;
}

Can anyone tell me what it is im doing wrong? like i said i looked on google quite a bit and tryed fixing myself but nothing happens. 
jontan6
Posts: 278
Joined: Fri Jun 13, 2008 5:29 pm

Post by jontan6 »

post the errors
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

Post by wyrmmage »

Posting the first five or so errors would definitely help :)

Other than that, I see your're missing two closing braces, but it's hard to tell (did you post the whole code?)
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Problem with compileing

Post by rogerborg »

Yup.

Code: Select all

if (node)
	{
		node->setMaterialFlag(EMF_LIGHTING, false);
		node->setMD2Animation ( scene::EMAT_STAND );
		node->setMaterialTexture( 0, driver->getTexture("../../media/sydney.bmp") );
^^^ missing closing brace

Code: Select all

while(device->run())
	{
driver->beginScene(true, true, SColor(255,100,101,140));

		smgr->drawAll();
		guienv->drawAll();

		driver->endScene();
^^^ missing closing brace
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Welcome back kojima pro, didn't manage to find another board? ;)
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Oh, right, this guy is brilliant! I guess I've found my Friday afternoon entertainment.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Kojima Pro
Posts: 15
Joined: Wed Oct 08, 2008 11:29 pm

Post by Kojima Pro »

aww come on..lol give me a break! that was awhile ago, and i quit for a bit because i found a coder that i was working with, see im a pro 3d artist, im not used to this stuff. ANd why bring up old news for?


Ok nevermind it was something so simple, rogerborg was right, with the closeing braces..yikes sorry about that.

THank you all who has tried to help me.
Post Reply