unresolved external

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
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

unresolved external

Post by rabehehbahreini »

hi.
I have to compile and run irrlicht from C++ builder 6.
when I try to compile helloword example I receive this error :
[Linker Error] Unresolved external 'irr::createDevice(irr::video::E_DRIVER_TYPE, const irr::core::dimension2d<int>&, unsigned int, bool, bool, bool, irr::IEventReceiver *, const char *)' referenced from F:\VISUALIZER\IRRLICHT-1.4\EXAMPLES\01.HELLOWORLD\MAIN.OBJ

How can I fix this error ?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

You need to configure your linker settings.
This isn't a problem with Irrlicht, moving to beginners help.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

I have changed my linker settings several times but nothing changed
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I'm not certain, but it is quite possible that you're linking the wrong Irrlicht library (you most likely need to link to the .lib file) or you're not linking to the Irrlicht library at all. If that is not the case I'd guess that there is some link incompatibility between the Irrlicht library you're trying to link to and the object code that you've created (not incredibly likely, but I'm not familiar with the Borland compiler).

I know that the dumpbin tool that ships with the Microsoft compiler can be used to get a list of exports from a library and dependencies of an object file. You could use a tool like this to ensure that the object code you've generated is trying to locate the same symbols that are defined in the Irrlicht library.

Travis
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

I am not a very proffesional programmer , but I can build and run the same .lib file with VC 2008 and every thing is ok.
overburn
Posts: 101
Joined: Sun Nov 04, 2007 8:08 am
Location: Romania, Ploiesti

Post by overburn »

it's definitely a linking problem.
did you include the path to irrlicht.lib in the compiler options?
you could try #pragma comment(lib,"Irrlicht.lib") if you haven't already
One Tequila, Two Tequila, Three Tequila, Floor.
_______________________________________
ASUS P5V-VM Ultra
Intel Pentium D930
1x 2GB DDR2 Kingmax 800mhz/533mhz mb
Leadtek PX9600GT W 512MB DDR3
200GB Maxtor HDD
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

yes, i included both the .h and .lib files. and the pragma command, still it doesn't work .
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You don't include a lib file, you link it, but I'm assuming that is just your misuse of the terminology.

If your linker is indeed finding the lib file, but it does not see the exported symbol, then there is some incompatibility between the pre-built Irrlicht library and the generated object code. I believe that the easy way to fix this is to build the Irrlicht library with the Borland compiler, but I don't know how much work that would be considering that it isn't one of the supported configurations.

Travis
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

you are right. there is incompatibility between lib files in VC and builder.
rabehehbahreini
Posts: 11
Joined: Sat Mar 14, 2009 3:40 pm

Post by rabehehbahreini »

I don't know the right .def file which is compatible with borland standard.
IMPLIb fails when I attempt to convert .lib file .
Do you know how to convert it ?
Post Reply