Jump to content
  • Advertisement
Sign in to follow this  
en972

Hello World (with irrlicht) errors

This topic is 4843 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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; }

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!