> -----Original Message-----
> From: magick-users-bounces imagemagick.org
> [mailto:magick-users-bounces imagemagick.org] On Behalf
Of
> Micha Feigin
> Sent: Wednesday, April 18, 2007 1:20 AM
> To: magick-users imagemagick.org
> Subject: RE: [magick-users] Compiling against magick
under
> windows (visual2005)
>
>
>
> > -----Original Message-----
> > From: omicronpersei8 imagemagick.org
> > [mailto:omicronpersei8 imagemagick.org]
> > Sent: Tuesday, April 17, 2007 4:57 PM
> > To: magick-users imagemagick.org; michf 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++
>
It seems that this is defined in the project and needs to be
explicitly defined
as a precompiler directive
for projects that include the file. I believe that setting
the solution in some
header will be a better solution
in this case, although using multiple configurations will be
more of a problem
of course.
> Things now link fine except for the linking error (also
> relevant to magic, specifically to Magick++), something
about
> redefining basic_string
>
Solved the problem here, the imagemagick library and my
program were using
different version of the
runtime library (multithreaded vs. dll multithreaded)
> 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 DU?$char_traits D std V?$allocator D 2 st
d QAE 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 DU?$char_traits D std V?$allocator D 2 st
d QAE PBD Z)
> already defined in CORE_RL_Magick++_.lib(Image.obj)
>
> _______________________________________________
> Magick-users mailing list
> Magick-users imagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick
-users
>
_______________________________________________
Magick-users mailing list
Magick-users imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
|