Help! why doesnt the 1st tutorial work?

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
dogzer

Help! why doesnt the 1st tutorial work?

Post by dogzer »

It gives me tons of errors. Anything that you help me with will be very helpful since i'm just starting

Code: Select all

#include <irrlicht.h>
 
using namespace irr;

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

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

int main()
{
	IrrlitchDevice *device = createDevice(EDT_SOFTWARE, dimention2d<s32>(640,480), 16,false,false,0)

	device->setWindowsCaption( L"Hello World! - Irrlicht Engine Demo");

	IVideoDriver *driver = device->getVideoDriver();
	ISceneManager *smgr = device->getSceneManager();
	IGUIEnviroment *guienv = device->getGUIEnviroment();

	guienv-> addStaticText(L"Hello world. Irrlicht Engine");

	while(device->run())
	{
		driver->beginScene(true, true, SColor(0,100,100,100));
		guienv->drawAll();
		driver->endScene();
	}
	device->drop();
	return 0;
}

errors:

--------------------Configuration: test - Win32 Debug--------------------
Compiling...
Main.cpp
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(15) : error C2065: 'IrrlitchDevice' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(15) : error C2065: 'device' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(15) : error C2065: 'dimention2d' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(15) : error C2275: 's32' : illegal use of this type as an expression
c:\irrlitch\irrlicht-0.6\include\irrtypes.h(41) : see declaration of 's32'
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(17) : error C2146: syntax error : missing ';' before identifier 'device'
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(17) : error C2227: left of '->setWindowsCaption' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(19) : error C2227: left of '->getVideoDriver' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(20) : error C2227: left of '->getSceneManager' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(21) : error C2065: 'IGUIEnviroment' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(21) : error C2065: 'guienv' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(21) : error C2227: left of '->getGUIEnviroment' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(23) : error C2227: left of '->addStaticText' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(25) : error C2227: left of '->run' must point to class/struct/union
C:\Program Files\Microsoft Visual Studio\MyProjects\test\Main.cpp(25) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Error executing cl.exe.

test.exe - 14 error(s), 0 warning(s)
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

For starters you have spelt Irrlicht wrong, you have put IrrlitchDevice. That will fix most your problems right there.
Post Reply