views:

161

answers:

2

I've downloaded the ImageMagick source, compiled the wizard to create a Visual Studio solution for static linkage, and included the static library Magick++ project in my sample project (code below). I've also added a dependency on that project and included the .lib file in the solution, nothing helps.

#include <Magick++.h>

int main()
{
    Magick::Image image;
    bool test = image.isValid();
    return 0;
}

This gives several linker errors, such as:

unresolved external symbol "__declspec(dllimport) public: virtual _thiscall Magick::Image::~Image(void)" (_imp_??1Image@Magick@@UAE@XZ) referenced in function _main

Why can't it find the implementation?

I'm using Visual Studio 2010 Beta 2.

+1  A: 

The problem may rise from that you are using different compiler than the library was compiled with. As your compiler is fairly new, it's very likely it uses different name mangling and can't find method signatures inside the library.

buratinas
A: 

This error is strange - The compiler is looking for a function from a DLL (__declspec(dllimport)). Are you sure you are using the right header files ?

uvgroovy