LNK2019 with VS2010 using std::list<Coordinate>

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
dannyjames

LNK2019 with VS2010 using std::list<Coordinate>

Post by dannyjames »

Hi everybody,

When trying to build the Magick++ demo "shapes" on a Windows 7 machine with VS2010 I get following errors (ImageMagick-6.6.3-4-Q8-windows-dll):

Code: Select all

Error	1	error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::allocator<class Magick::Coordinate>::construct(class Magick::Coordinate *,class Magick::Coordinate &&)" (__imp_?construct@?$allocator@VCoordinate@Magick@@@std@@QAEXPAVCoordinate@Magick@@$$QAV34@@Z) referenced in function "void __cdecl std::_Cons_val<class std::allocator<class Magick::Coordinate>,class Magick::Coordinate,class Magick::Coordinate>(class std::allocator<class Magick::Coordinate> &,class Magick::Coordinate *,class Magick::Coordinate &&)" (??$_Cons_val@V?$allocator@VCoordinate@Magick@@@std@@VCoordinate@Magick@@V34@@std@@YAXAAV?$allocator@VCoordinate@Magick@@@0@PAVCoordinate@Magick@@$$QAV23@@Z)	C:\Users\sausalito\Desktop\thirdparty\ImageMagick-6.6.3-Q8\Magick++_Demo\shapes.obj	shapes
And more or less the same error for std::allocator<Magick::Drawable>.
I'm also getting this error in my own program, as soon as I use either an std::list<Coordinate> or an std::list<Drawable>.
Quite some time with google led me to the conclusion that it has something to do with how Coordinate and Drawable are exported.

Is there a known workaround for this problem? Or does somebody have an idea?

Best Regards

Danny
Post Reply