Hello World errors *gasps*

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
en972
Posts: 27
Joined: Tue Apr 26, 2005 7:58 pm

Hello World errors *gasps*

Post by en972 »

Hi! I'm working on compileing irrlicht with borland. And so I got some errors. Now it obviously found the irrlicht.h header fine. It also find the lib directory. I pretty much copied and pasted the code from the hello world tutorial (the one for visual C++ and visual studio). So I am not asking you to solve all my errors. But It would be nice if you could point out a few.

My errors are:

[C++ Error] irrArray.h(131): E2211 Inline assembly not allowed in inline and template functions
[C++ Error] quaternion.h(153): E2268 Call to undefined function 'sqrtf'
[C++ Error] quaternion.h(329): E2268 Call to undefined function 'sqrtf'
[C++ Error] irrlicht.h(287): E2108 Improper use of typedef 'video::E_DRIVER_TYPE'
[C++ Error] irrlicht.h(287): E2293 ) expected
[C++ Error] Unit1.cpp(16): E2314 Call of nonfunction


My CODE:

#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()
{
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("../../media/sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );

if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setFrameLoop(0, 310);
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(0,200,200,200));

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

driver->endScene();
}

device->drop();
return 0;
}
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

The errors that you have been given have nothing to do with your code. They are in Irrlicht, I don't know of anyone getting Irrlicht to work with Borland, so if I were you I would try to go into the mentioned files and fix those errors.

Error #1
I believe you will need to replace the inline assembly with an assertion. Ex. assert(0);
You will need to include assert.h for that.

Error #2
You need to define the function sqrtf, which should be a squareroot for floats. It might work if you just replace it with sqrt, but I'm not exactly sure.

Error #3
Same as Error #2

Error #4
I have no idea...

Error #5
See #4

Error #6
See #5

I hope that helps!
________
LANSING DELTA TOWNSHIP ASSEMBLY
Post Reply