undefined reference to irr::createDevice

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
victorglt
Posts: 1
Joined: Sun Jun 01, 2008 2:02 am

undefined reference to irr::createDevice

Post by victorglt »

i'm trying to compile a sample application with irrlicht. I unpacked the zip file and under Eclipse CDT i have set the include and library paths. However, i always get this error:

undefined reference to `irr::createDevice(irr::video::E_DRIVER_TYPE, irr::core::dimension2d<int> const&, unsigned int, bool, bool, bool, irr::IEventReceiver*, char const*)'

I'm using linux ubuntu 8.04.

Any ideias ?
limvot
Posts: 20
Joined: Sun Sep 09, 2007 2:41 am

Post by limvot »

Well it would seem that somehow Eclipse is not finding irrlicht, or at least part of it.

You did include irrlicht.h didn't you? ( #include <irrlicht.h>)

are you trying to compile the first example?
Hi me noob so help me.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

What's the char* you've put as the final parameter of createDevice? It's certainly never been a parameter before version 1.4 of irrlicht (though could be in 1.4, i've not upgraded yet, tut tut).

EDIT: i see what it is now, the version of irrlicht.. but you shouldn't use it so don't specify a parameter for that, though it shouldn't be what's causing the problem...
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

You'll need to actually link with the Irrlicht library. I'm sure your IDE documentation will tell you how to do that.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

He said he's setup the library paths.... but maybe they're wrong or something... does it say anything when linking that it couldn't find the library?

Do you have the pragma comment that the tutorials use for linking?
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, simply setting the paths need not automatically link the library. You will need a link command somewhere, either via pragma for MSVC, or via a compiler swtich.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

JP wrote:He said he's setup the library paths....
Yes, he did say that.

JP wrote:Do you have the pragma comment that the tutorials use for linking?
#pragma is implementation (i.e. compiler) dependent.

Does Eclipse understand it?

No, apparently not.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

rogerborg wrote: #pragma is implementation (i.e. compiler) dependent.

Does Eclipse understand it?

No, apparently not.
Well, Eclipse is not a compiler, so why should it? If you can use Eclipse with MSVC it should support the pragma stuff.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Heh, fair point. Good luck using MSVC on Ubuntu though. ;)
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply