Upgrading to 0.4.2
Upgrading to 0.4.2
I have just upgraded the version of Irrlicht I'm using to 0.4.2 and after some minor changes to my code, everything seems to compile. However I am now getting an unresolved external:
"MM error LNK2019: unresolved external symbol "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::EDriverType,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,class irr::IEventReceiver *,wchar_t const *)" (__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PB_W@Z) referenced in function "public: void __thiscall CClient::Run(void)" (?Run@CClient@@QAEXXZ)"
Any ideas??
"MM error LNK2019: unresolved external symbol "__declspec(dllimport) class irr::IrrlichtDevice * __cdecl irr::createDevice(enum irr::video::EDriverType,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,class irr::IEventReceiver *,wchar_t const *)" (__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PB_W@Z) referenced in function "public: void __thiscall CClient::Run(void)" (?Run@CClient@@QAEXXZ)"
Any ideas??
Simply done with this line:
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver);
I have also tried changing the line to:
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver, IRRLICHT_SDK_VERSION);
WIDTH and HEIGHT are defined elsewhere but are currently 800 and 600 respectively.
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver);
I have also tried changing the line to:
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver, IRRLICHT_SDK_VERSION);
WIDTH and HEIGHT are defined elsewhere but are currently 800 and 600 respectively.
-
DarkWhoppy
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact:
Notice your device setup there...Descend wrote:Simply done with this line:
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver);
I have also tried changing the line to:
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver, IRRLICHT_SDK_VERSION);
WIDTH and HEIGHT are defined elsewhere but are currently 800 and 600 respectively.
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, receiver, IRRLICHT_SDK_VERSION);
Now try this one...
IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(WIDTH, HEIGHT), 32, false, false, &receiver, IRRLICHT_SDK_VERSION);
The event reciever should be a pointer address of the reciever.
-
Guest
Guys, this is a "MM error LNK2019"--- a Link Error.
its not caused by the wrong .dll, or by a typo. its caused by not finding the offending function inside the .lib file.
there are only a number of things that could cause this:
1) its a 0.4 function which is not found in 0.4.2 .lib you say you are using
2) you're not actually using the 0.4.2 .lib (though you're probably using the 0.4.2 headers)
3) you're 'using' the 0.4.2 .lib, but you havent set up your project to properly include it-- since it cant find the .lib, you have a link error (but somewhere in the compile output it should say 'couldnt find included xxx.lib')
4) you have redefined the function header for some silly reason (not likely)
my money is on 3
its not caused by the wrong .dll, or by a typo. its caused by not finding the offending function inside the .lib file.
there are only a number of things that could cause this:
1) its a 0.4 function which is not found in 0.4.2 .lib you say you are using
2) you're not actually using the 0.4.2 .lib (though you're probably using the 0.4.2 headers)
3) you're 'using' the 0.4.2 .lib, but you havent set up your project to properly include it-- since it cant find the .lib, you have a link error (but somewhere in the compile output it should say 'couldnt find included xxx.lib')
4) you have redefined the function header for some silly reason (not likely)
my money is on 3
a screen cap is worth 0x100000 DWORDS
I was thinking 3 too, but there are no missing library errors, it just simply cannot seem to find the function inside the library.
The only thing I've got to go on here is that it is looking for the function:
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PB_W@Z
But in the actual DLL (Opened using PE Viewer) the function is
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PBG@Z
Notice the only difference is PB_W and PBG ... I have no idea what that means though if it means anything at all!
The only thing I've got to go on here is that it is looking for the function:
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PB_W@Z
But in the actual DLL (Opened using PE Viewer) the function is
?createDevice@irr@@YAPAVIrrlichtDevice@1@W4EDriverType@video@1@ABV?$dimension2d@H@core@1@I_N2PAVIEventReceiver@1@PBG@Z
Notice the only difference is PB_W and PBG ... I have no idea what that means though if it means anything at all!
yeah, are you using MSVC or DevCpp
I suppose ICE gives you the same error?
http://www.skyesurfer.net/keless/IrrLicht/ICE/
interesting-- I used both MSVC and DevCpp to build it, perhaps I left a .dll or .lib file belonging to the opposite IDE that you're using? I have not modified the engine in anyway, so you shouldnt have a problem if you havent either. (0.4.2)keless, your Tetris game gives me the same link error. I have absolutely no idea what's going on, since all of my projects compile/run fine.
I suppose ICE gives you the same error?
http://www.skyesurfer.net/keless/IrrLicht/ICE/
a screen cap is worth 0x100000 DWORDS
Ah, i found an easy (if hack-ish) solution:
In your SolutionExplorer, choose 'add existing item' and browse till you find the MSVC IrrLicht.lib file. select it (it is now included in your project tree).
Build, and wala!
With my Tetris and ICE src distributions, I have a folder called /dlls/MSVC/ which has both the .DLL and the .LIB -- (apparently this was the reason I included the .LIB)
In your SolutionExplorer, choose 'add existing item' and browse till you find the MSVC IrrLicht.lib file. select it (it is now included in your project tree).
Build, and wala!
With my Tetris and ICE src distributions, I have a folder called /dlls/MSVC/ which has both the .DLL and the .LIB -- (apparently this was the reason I included the .LIB)
a screen cap is worth 0x100000 DWORDS