Featured post
c++ - Magick++ in VS2010 - unresolved external symbol -
i'm trying use imagemagick magick++ c++ project in vs2010. installed library here: klick
then in project, added c:/program files/imagemagick-6.6.6-q16/include include folders. tried use magick++ code:
#include <magick++.h> void main(int argc, char ** argv){ initializemagick(*argv); }
but not work! vs2010 returns following errors:
error lnk2001: unresolved external symbol "__declspec(dllimport) void __cdecl magick::initializemagick(char const *)" (__imp_?initializemagick@magick@@yaxpbd@z) error lnk1120: 1 unresolved externals
what doing wrong?
thanks help!
update:
set linker -> input -> additionnal dependencies to:
kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;core_rl_magick++_.lib
and linker -> general -> additionnal library directories to:
c:\program files\imagemagick-6.6.6-q16\lib
it still results in same error...
update 2
opening .lib files in c:\program files\imagemagick-6.6.6-q16\lib results in error:
update 3
core_rl_magick++_.lib contain ?initializemagick@magick@@yaxpebd@z, not ?initializemagick@magick@@yaxpbd@z. mean .lib file corrupted?
update 4
i solved problem manually compliling .lib files. all!
core_rl_magick++_.lib contain ?initializemagick@magick@@yaxpebd@z, not ?initializemagick@magick@@yaxpbd@z
using undname.exe utility, these names undecorate to:
void __cdecl magick::initializemagick(char const *) void __cdecl magick::initializemagick(char const * __ptr64)
note __ptr64 declarator got on argument. you've got kind of compile setting turns char* 64-bit pointer. compiling code targeting 64-bit operating system. linking 32-bit .lib. generates linker error bit-ness of .lib being wrong, not sure why don't see this. maybe mingw artifact, not sure how works.
- Get link
- X
- Other Apps
Comments
Post a Comment