I NEED HELP!
I NEED HELP!
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''
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''
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;
}
#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;
}
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;
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 23
- Joined: Fri Apr 27, 2007 3:22 pm
- Location: Brazil