Using ImageMagick with Dev-C++ on Windows

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
gonebaby
Posts: 4
Joined: 2011-04-14T08:58:02-07:00
Authentication code: 8675308

Using ImageMagick with Dev-C++ on Windows

Post by gonebaby »

I'm trying to write a C++ program that uses ImageMagick and I can't get it to link without errors. I am on Windows 7 and using the Dev-C++ IDE.

I have a linker error for every reference to a Magick++ function, like so:
[Linker error] undefined reference to `Magick::Image::Image()'
[Linker error] undefined reference to `Magick::Image::read(std::string const&)'
etc...

I don't need to change anything in Magick++, just use it. So I downloaded it already compiled, Windows 32 bit, 8 bit precision, DLL, and installed it.
I've tried everything, adding links to all four of the libraries (after converting them to .a from .lib) in my linker parameters in project options, added both the ImageMagick Library and Include directories to project options, thrown every single DLL in the ImageMagick folder (like 20 of them) into my project folder, etc...

Nothing has ever made a difference. And yes I have Magick::InitializeMagick(""); in my main.

Your .dsp project files in the demo folder can't be converted and read by Dev-C++ (4.9.9.2), in fact I couldn't even open them in VS10 after I broke down and installed it, they couldn't be converted.

Help?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Using ImageMagick with Dev-C++ on Windows

Post by magick »

Just yesterday we clicked on the Magick++ button workspace. It was auto-converted to VS2010. Next we choose the release version and selected Build. The project compiled and run without complaint. We're not sure why it fails for you.
gonebaby
Posts: 4
Joined: 2011-04-14T08:58:02-07:00
Authentication code: 8675308

Re: Using ImageMagick with Dev-C++ on Windows

Post by gonebaby »

magick wrote:Just yesterday we clicked on the Magick++ button workspace. It was auto-converted to VS2010. Next we choose the release version and selected Build. The project compiled and run without complaint. We're not sure why it fails for you.
Ok somehow I got it to change. I have about a lot of extra .vcproj, .vcproj.filters, .suo, .sdf, .opensdf, .vcproj.<computer name>.<user name>.user, .vcxproj.user and .sln files in the folder from messing around with both VS2008 and VS2010 trying to get it to convert.

I can now build the projects (and look at them) in VS2010. However I still can't get anything to convert in Dev-C++, it can't find the Win32 configuration for any of the projects.

Oh, and I downloaded ImageMagick again (though by the way, downloading 6.6.9-5-Q8-windows-dll and running it asked me to install in "Program Files (x86)/ImageMagick-6.6.9-Q8-static"), and when I open the new button.dsp in 2010 it doesn't work. Just shows a blank error pane with no errors and won't open any files (this is after I tell it to convert the project).

I don't really give a hoot about opening button.dsp in VS2010. My question is on how to get rid of my linker errors in Dev-C++. Can you help me at all? I've been trying to get your code to work for days. OpenGL and GLUT took about 10 minutes to get right, but for some reason adding the 4 libraries in your lib folder does nothing, I still can't get the linker to see any Magick++ code.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Using ImageMagick with Dev-C++ on Windows

Post by magick »

We have not used Dev-C++. Our argument is that if Magick++ works with Visual C++ it proves Magick++ works fine under Windows and now its just a question of choosing the right configuration parameters for the Dev-C++ environment. Perhaps another Dev-C++ user can help you with configuring Dev-C++ to link against the Magick++ library.
Post Reply