undefined reference to `_imp__createDeviceEx

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
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

undefined reference to `_imp__createDeviceEx

Post by mant »

Hi Everyone. My code doesn't compile.
But with the prebuilt Irrlicht 1.81 lib, it works fine.

I'm trying to use static lib so I compiled Irrlicht with MinGW on Windows XP SP3.
At first, I use MSYS to build: mingw32-make staticlib_win32

And later I build it in CodeBlocks (opening the .cbp file in folder source/Irrlicht)
with Build Config: Debug - staticlib

These both builds were completed, but when using them I get the same results:
I defined _IRR_STATIC_LIB_

Code: Select all

||=== Build: Debug in gamepractice (compiler: GNU GCC Compiler) ===|
obj\Debug\src\core\Application.o||In function `ZN11Application9initVideoEv':|
C:\gamepractice\src\core\Application.cpp|52|undefined reference to `_imp__createDeviceEx|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
Can anyone tell me how to fix this?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: undefined reference to `_imp__createDeviceEx

Post by CuteAlien »

Are you sure you link to the correct path? Double check that stuff. The application needs to have the linker-path where the Irrlicht.lib (or mabye Irrlicht.a ... depends on c::b version) is now. Check if the date of that file has changed when you did build it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

Re: undefined reference to `_imp__createDeviceEx

Post by mant »

Yes it is correct. BTW if it's not CB will say cannot find the library :D
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: undefined reference to `_imp__createDeviceEx

Post by CuteAlien »

Well - it might find the wrong library - that's that causes this bug most often. That's twhy I recommend to check for the date of the file in that folder - if it really got updated. Or even better: Delete that lib. Check if you get a linker error now. And then rebuild it.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mant
Posts: 125
Joined: Sun Jan 27, 2013 3:38 pm

Re: undefined reference to `_imp__createDeviceEx

Post by mant »

I forgot to check the date since I gave it a glance to the file size. Actually the OS was installed on Virtual Box. All the binaries compiled with dynamic lib keeps showing this when running:
OpenGL Warning: VBoxCrHgsmi Create failed
And all of the examples don't let me control the mouse as the camera always points to the sky.
I think there's some kind of OpenGL driver bugs of the virtual machine.
Alright, although I built it twice I will do it again.
Post Reply