I NEED HELP!

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
jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

I NEED HELP!

Post by jmcorp »

I got the following errors after trying out the very first tutorial on the tutorial page, please help.

i am using Microsoft Visual C++ 2005 express edition.
thanks in advance.

Compiling...
main.cpp
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(10) : error C2065: 'EDT_SOFTWARE' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(10) : error C2065: 'dimension2d' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(10) : error C2275: 'irr::s32' : illegal use of this type as an expression
c:\boys homework\irrlicht-1.4\irrlicht-1.4\include\irrtypes.h(43) : see declaration of 'irr::s32'
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(14) : error C2065: 'IVideoDriver' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(14) : error C2065: 'driver' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(15) : error C2065: 'ISceneManager' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(15) : error C2065: 'smgr' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(16) : error C2065: 'IGUIEnvironment' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(16) : error C2065: 'guienv' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(18 ) : error C2227: left of '->addStaticText' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(18 ) : error C2065: 'rect' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(18 ) : error C2062: type 'int' unexpected
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(20) : error C2065: 'IAnimatedMesh' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(20) : error C2065: 'mesh' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(20) : error C2227: left of '->getMesh' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(21) : error C2065: 'IAnimatedMeshSceneNode' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(21) : error C2065: 'node' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(21) : error C2227: left of '->addAnimatedMeshSceneNode' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(25) : error C2227: left of '->setMaterialFlag' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(25) : error C2065: 'EMF_LIGHTING' : undeclared identifier
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(26) : error C2227: left of '->setFrameLoop' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(27) : error C2227: left of '->setMaterialTexture' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(27) : error C2227: left of '->getTexture' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(30) : error C2227: left of '->addCameraSceneNode' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(30) : error C3861: 'vector3df': identifier not found
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(30) : error C3861: 'vector3df': identifier not found
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(34) : error C2227: left of '->beginScene' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(34) : error C3861: 'SColor': identifier not found
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(36) : error C2227: left of '->drawAll' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(38 ) : error C2227: left of '->drawAll' must point to class/struct/union/generic type
type is ''unknown-type''
c:\users\emelle\documents\visual studio 2005\projects\game1\game1\main.cpp(40) : error C2227: left of '->endScene' must point to class/struct/union/generic type
type is ''unknown-type''
bigzpanda
Posts: 8
Joined: Fri Dec 21, 2007 11:24 am

Post by bigzpanda »

Could we see your main.cpp file ?
jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

Post by jmcorp »

here is my main.cpp file.

#include <irrlicht.h>

using namespace irr;

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

int main()
{
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("C:/boys homework/irrlicht-1.4/irrlicht-1.4/media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

if (node)

{ node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
node->setMaterialTexture( 0, driver->getTexture("C:/boys homework/irrlicht-1.4/irrlicht-1.4/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;

}
bigzpanda
Posts: 8
Joined: Fri Dec 21, 2007 11:24 am

Post by bigzpanda »

Maybe you should try to add these namespaces:

Code: Select all

using namespace core;

using namespace scene;

using namespace video;

using namespace io;

using namespace gui;

jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

Post by jmcorp »

Thanks sooo much that i gotten rid of all the 31 errors, but i error remains, this is what is still says:

"Linking...
LINK : fatal error LNK1104: cannot open file 'Irrlicht.lib'"
bigzpanda
Posts: 8
Joined: Fri Dec 21, 2007 11:24 am

Post by bigzpanda »

Copy the file Irrlicht.lib in the same directory that your executable.
jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

Post by jmcorp »

jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

Post by jmcorp »

thats what i get, even though i have copied the irrlicht.lib into my exe folder(the one in my documents)
CuteAlien
Admin
Posts: 9733
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

irrlicht.lib is used during linking. At runtime you need irrlicht.dll
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
jmcorp
Posts: 5
Joined: Fri Dec 21, 2007 8:55 pm
Location: programming...on my PC

Post by jmcorp »

Thanks!! Its working now! :D
patrickniceboy
Posts: 23
Joined: Fri Apr 27, 2007 3:22 pm
Location: Brazil

Post by patrickniceboy »

please describes more your subject when you make a post, not just 'I need help' !

ok? :idea:
Post Reply