List Info

Thread: Re: Compiling against magick under windows (visual 2005)




Re: Compiling against magick under windows (visual 2005)
user name
2007-04-17 08:57:16
> 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.
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

RE: Compiling against magick under windows (visual 2005)
user name
2007-04-17 17:20:00
 

> -----Original Message-----
> From: omicronpersei8imagemagick.org 
> [mailto:omicronpersei8imagemagick.org] 
> Sent: Tuesday, April 17, 2007 4:57 PM
> To: magick-usersimagemagick.org; michfpost.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_stringDU?$char_traitsDstdV?$allocatorD2stdQAEXZ)
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_stringDU?$char_traitsDstdV?$allocatorD2stdQAEPBDZ)
already defined in CORE_RL_Magick++_.lib(Image.obj)

_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

RE: (solved) Compiling against magick under windows (visual2005)
user name
2007-04-17 18:29:46
 

> -----Original Message-----
> From: magick-users-bouncesimagemagick.org 
> [mailto:magick-users-bouncesimagemagick.org] On Behalf
Of 
> Micha Feigin
> Sent: Wednesday, April 18, 2007 1:20 AM
> To: magick-usersimagemagick.org
> Subject: RE: [magick-users] Compiling against magick
under 
> windows (visual2005)
> 
>  
> 
> > -----Original Message-----
> > From: omicronpersei8imagemagick.org
> > [mailto:omicronpersei8imagemagick.org]
> > Sent: Tuesday, April 17, 2007 4:57 PM
> > To: magick-usersimagemagick.org; michfpost.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_stringDU?$char_traitsDstdV?$allocatorD2st
dQAEXZ) 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_stringDU?$char_traitsDstdV?$allocatorD2st
dQAEPBDZ)
> already defined in CORE_RL_Magick++_.lib(Image.obj)
> 
> _______________________________________________
> Magick-users mailing list
> Magick-usersimagemagick.org
> http://studio.imagemagick.org/mailman/listinfo/magick
-users
> 

_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )