[magick-users] Compiling against magick under windows (visual
2005)
Micha Feigin
michf at post.tau.ac.il
Tue Apr 17 15:20:00 PDT 2007
> -----Original Message-----
> From: omicronpersei8 at imagemagick.org
> [mailto:omicronpersei8 at imagemagick.org]
> Sent: Tuesday, April 17, 2007 4:57 PM
> To: magick-users at imagemagick.org; michf at post.tau.ac.il
> Subject: Re: [magick-users] Compiling against magick under
> windows (visual 2005)
>
> > I'm trying to build the library under windows with visual
> studio 2005
>
> We build under visual studio 2005. We run into a strange bug
> in the IDE where it stops building and if we restart the
> build a few times it will complete. It never stops in the same place.
>
Ok, I got a partial solution. It turns out that the Magick++ headers (Image.h)
specifically default to look for the dll version of the library even when built
statically (I would guess that this is either a bug or that my headers don't
match the libraries). I solved this by defining _LIB when compiling the program
which includes Magick++
Things now link fine except for the linking error (also relevant to magic,
specifically to Magick++), something about redefining basic_string
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::~basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>(void)"
(??1?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already
defined in CORE_RL_Magick++_.lib(Image.obj)
msvcprt.lib(MSVCP80.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
>(char const *)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z)
already defined in CORE_RL_Magick++_.lib(Image.obj)
More information about the Magick-users
mailing list