Problems LINKING release version of Magick++ with VS2012

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
wagner.patriota
Posts: 3
Joined: 2012-12-08T06:18:13-07:00
Authentication code: 6789

Problems LINKING release version of Magick++ with VS2012

Post by wagner.patriota »

I am using the last Visual Studio 2012
I downloaded the Windows source code of ImageMagick.

1. I compiled the "configure" in VisualMagick
2. I set up the target with Win32 / 8 bit-depth
3. I compiled the All.vcxproj on both debug and release mode.

Problem:
When I try to LINK the application, it WORKS for the debug version perfectly, but when I try to link with the RELEASE version, it doesn't work. It says:
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::DrawableCompositeImage::~DrawableCompositeImage(void)" (__imp_??1DrawableCompositeImage@Magick@@UAE@XZ)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::DrawableCompositeImage::DrawableCompositeImage(double,double,class Magick::Image const &)" (__imp_??0DrawableCompositeImage@Magick@@QAE@NNABVImage@1@@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Drawable::~Drawable(void)" (__imp_??1Drawable@Magick@@QAE@XZ)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Drawable::Drawable(class Magick::DrawableBase const &)" (__imp_??0Drawable@Magick@@QAE@ABVDrawableBase@1@@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: struct MagickCore::_PixelPacket const * __thiscall Magick::Image::getConstPixels(long,long,unsigned int,unsigned int)const " (__imp_?getConstPixels@Image@Magick@@QBEPBU_PixelPacket@MagickCore@@JJII@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::size(class Magick::Geometry const &)" (__imp_?size@Image@Magick@@QAEXABVGeometry@2@@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::penColor(class Magick::Color const &)" (__imp_?penColor@Image@Magick@@QAEXABVColor@2@@Z)
1>IBitmap.obj : error LNK2001: 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)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::read(unsigned int,unsigned int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum MagickCore::StorageType,void const *)" (__imp_?read@Image@Magick@@QAEXIIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4StorageType@MagickCore@@PBX@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Magick::Image::draw(class Magick::Drawable const &)" (__imp_?draw@Image@Magick@@QAEXABVDrawable@2@@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Image::~Image(void)" (__imp_??1Image@Magick@@UAE@XZ)
1>IBitmap.obj : error LNK2001: 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)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(void)" (__imp_??0Image@Magick@@QAE@XZ)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::DrawableRectangle::~DrawableRectangle(void)" (__imp_??1DrawableRectangle@Magick@@UAE@XZ)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::~Geometry(void)" (__imp_??1Geometry@Magick@@QAE@XZ)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Geometry::Geometry(unsigned int,unsigned int,long,long,bool,bool)" (__imp_??0Geometry@Magick@@QAE@IIJJ_N0@Z)
1>IBitmap.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::DrawableRectangle::DrawableRectangle(double,double,double,double)" (__imp_??0DrawableRectangle@Magick@@QAE@NNNN@Z)
1>SFRunLoop.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall Magick::Color::~Color(void)" (__imp_??1Color@Magick@@UAE@XZ)
1>SFRunLoop.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Color::Color(unsigned char,unsigned char,unsigned char)" (__imp_??0Color@Magick@@QAE@EEE@Z)
What am I doing wrong? :-(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problems LINKING release version of Magick++ with VS2012

Post by magick »

Go to c:\Program Files\ImageMagick-6.8.0-Q16\Magick++_demos and click on the Button workspace. Build and run. Does that work? If so, use this workspace as a template for your own project.
Post Reply