linkage problems with Magick++ and MinGW
Posted: 2009-04-01T19:36:05-07:00
Hi there,
I'm developing a C++ program using Magick++ in Linux. Up till now everything has been working great, but I've hit a wall while trying to build a Windows port using MinGW. To illustrate the problem, let's say we have a simple program:
This compiles and links without a problem in Linux. Next, I've installed a binary Windows release of IM, but I can't get even such a simple program to link successfully with the CORE_RL* dll's.
I get the exact same results while trying to compile with MinGW in Windows. I'd be very grateful for any helpful suggestions. Thanks.
I'm developing a C++ program using Magick++ in Linux. Up till now everything has been working great, but I've hit a wall while trying to build a Windows port using MinGW. To illustrate the problem, let's say we have a simple program:
Code: Select all
int main(int argc, char **argv)
{
#ifdef WIN32
InitializeMagick(*argv);
#endif
Image pic;
pic.read("a.bmp");
pic.crop( Geometry(100,100, 100, 100));
pic.write("b.bmp");
}
Code: Select all
neuviemep@ihuarraquax:magick$ i586-mingw32msvc-g++ -I/mnt/winxp/Program\ Files/ImageMagick-6.3.7-Q16/include/ -o mtest.exe mtest.cc -L/mnt/winxp/Program\ Files/ImageMagick-6.3.7-Q16/ -lCORE_RL_Magick++_
undefined reference to `Magick::Image::Image()'
undefined reference to Magick::Image::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
[...]
collect2: ld returned 1 exit status