Page 1 of 1

I NEED HELP!

Posted: Fri Dec 21, 2007 8:57 pm
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''

Posted: Fri Dec 21, 2007 9:10 pm
by bigzpanda
Could we see your main.cpp file ?

Posted: Fri Dec 21, 2007 9:13 pm
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;

}

Posted: Fri Dec 21, 2007 9:15 pm
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;


Posted: Fri Dec 21, 2007 9:23 pm
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'"

Posted: Fri Dec 21, 2007 9:27 pm
by bigzpanda
Copy the file Irrlicht.lib in the same directory that your executable.

Posted: Fri Dec 21, 2007 9:38 pm
by jmcorp

Posted: Fri Dec 21, 2007 9:40 pm
by jmcorp
thats what i get, even though i have copied the irrlicht.lib into my exe folder(the one in my documents)

Posted: Fri Dec 21, 2007 9:41 pm
by CuteAlien
irrlicht.lib is used during linking. At runtime you need irrlicht.dll

Posted: Fri Dec 21, 2007 10:11 pm
by jmcorp
Thanks!! Its working now! :D

Posted: Sat Dec 22, 2007 12:43 am
by patrickniceboy
please describes more your subject when you make a post, not just 'I need help' !

ok? :idea: