Hello World (with irrlicht) errors

Started by
2 comments, last by en972 18 years, 8 months ago
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; }
Belive it or not...this is C++....
Advertisement
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!
My game development blog: http://rykerlabs.com
I think that you should try with other compiler, like Mingw or Dev-cpp (they are free).
Irrlicht works very good with that compilers.
Disanti thanks alot!

And martin, I have set it up with Dev-C++ before. I do love borland and thats why I am doing this. I am also doing it so I can post a faq on how to.

Thanks!

Belive it or not...this is C++....

This topic is closed to new replies.

Advertisement