[ Visual studio ] Dll from lib: symbole error

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
Deltax
Posts: 2
Joined: Sat May 10, 2014 4:59 pm

[ Visual studio ] Dll from lib: symbole error

Post by Deltax »

Hi,

I'm encapsulating Irrlicht in a dynamique library (.dll) using Irrlicht static library (.lib).
I have the error: error LNK2001: external symbol not resolved __imp_createDevice
But I'm compiling with the library.

So I toked a look into the .lib and I saw that there is no __imp_createDevice but only createDevice symbol.

What can I do for fix this, please ?
Deltax
Posts: 2
Joined: Sat May 10, 2014 4:59 pm

Re: [ Visual studio ] Dll from lib: symbole error

Post by Deltax »

I fixed it.
After a all night dreaming about this problem, I understood that the __imp_ before the symbol is caused by the keyword __declspec(dllimport).

I just defined _IRR_STATIC_LIB_ in my dll project and the error gone.

Hop that can help some one else.
Post Reply