Win VC++ ImageMagick-7.0.8-Q16\Magick++_Demo - Getting :error LNK2019: unresolved external symbol "__declspec(dllimport)

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
umen
Posts: 12
Joined: 2012-06-27T06:49:24-07:00
Authentication code: 13

Win VC++ ImageMagick-7.0.8-Q16\Magick++_Demo - Getting :error LNK2019: unresolved external symbol "__declspec(dllimport)

Post by umen »

I try to compile the ImageMagick-7.0.8-Q16\Magick++_Demo the button example
using VC++ 2017 ,
added CORE_RL_MagickCore_.lib to the linkage as no CORE_RL_magick_.lib exists
The dll are in the PATH no problem to find them
what im missing here ?

but im getting :

Code: Select all

1>------ Build started: Project: button, Configuration: Release Win32 ------
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl Magick::InitializeMagick(char const *)" (__imp_?InitializeMagick@Magick@@YAXPBD@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Color::Color(char const *)" (__imp_??0Color@Magick@@QAE@PBD@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Color::Color(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0Color@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Color::~Color(void)" (__imp_??1Color@Magick@@UAE@XZ) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::Geometry(char const *)" (__imp_??0Geometry@Magick@@QAE@PBD@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::Geometry(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0Geometry@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::~Geometry(void)" (__imp_??1Geometry@Magick@@QAE@XZ) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(void)" (__imp_??0Image@Magick@@QAE@XZ) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_??0Image@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image@Magick@@UAE@XZ) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::borderColor(class Magick::Color const &)" (__imp_?borderColor@Image@Magick@@QAEXABVColor@2@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::compressType(enum MagickCore::CompressionType)" (__imp_?compressType@Image@Magick@@QAEXW4CompressionType@MagickCore@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::depth(unsigned int)" (__imp_?depth@Image@Magick@@QAEXI@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::fillColor(class Magick::Color const &)" (__imp_?fillColor@Image@Magick@@QAEXABVColor@2@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::font(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?font@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::fontPointsize(double)" (__imp_?fontPointsize@Image@Magick@@QAEXN@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::quantizeColors(unsigned int)" (__imp_?quantizeColors@Image@Magick@@QAEXI@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::quantizeDither(bool)" (__imp_?quantizeDither@Image@Magick@@QAEX_N@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::size(class Magick::Geometry const &)" (__imp_?size@Image@Magick@@QAEXABVGeometry@2@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::annotate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum MagickCore::GravityType)" (__imp_?annotate@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4GravityType@MagickCore@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::frame(class Magick::Geometry const &)" (__imp_?frame@Image@Magick@@QAEXABVGeometry@2@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::quantize(bool)" (__imp_?quantize@Image@Magick@@QAEX_N@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::read(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?read@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::texture(class Magick::Image const &)" (__imp_?texture@Image@Magick@@QAEXABV12@@Z) referenced in function _main
1>button.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::write(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?write@Image@Magick@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
1>..\lib\CORE_RL_MagickCore_.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>..\lib\CORE_RL_Magick++_.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>..\lib\CORE_RL_MagickWand_.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
1>.\button.exe : fatal error LNK1120: 25 unresolved externals
1>Done building project "button.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Win VC++ ImageMagick-7.0.8-Q16\Magick++_Demo - Getting :error LNK2019: unresolved external symbol "__declspec(dllimp

Post by snibgo »

I don't use VC++ but one problem is:
1>..\lib\CORE_RL_MagickCore_.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
It seems your library has been build for 64-bit CPUs but your target machine is a 32-bit CPU.
snibgo's IM pages: im.snibgo.com
umen
Posts: 12
Joined: 2012-06-27T06:49:24-07:00
Authentication code: 13

Re: Win VC++ ImageMagick-7.0.8-Q16\Magick++_Demo - Getting :error LNK2019: unresolved external symbol "__declspec(dllimp

Post by umen »

Thanks it helped
Post Reply