[solved] How to include Magick++ in Eclipse?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
reimer

[solved] How to include Magick++ in Eclipse?

Post by reimer »

Sorry for this "simple" question. The search function didn't work with the keywords 'eclipse' and 'library path', so that's why I'm posting now.

I included the header files from /usr/local/include/Magick++ and what libraries should I use?

There are:

/usr/local/lib/libMagick++.10.0.7.dylib
/usr/local/lib/libMagick++.10.dylib
/usr/local/lib/libMagick++.a
/usr/local/lib/libMagick++.dylib
/usr/local/lib/libMagick++.la
Last edited by reimer on 2008-08-26T06:55:25-07:00, edited 1 time in total.
reimer

Re: How to include Magick++ in Eclipse?

Post by reimer »

Ok, it's quite easy. I read the manpage several times but didn't understand how to use the options. But I found it out.

For newbies:
Lets say you would like to use a library named libMagick++.a . Then you have to tell the compiler the location (if it's a standard location this is optional) by -Ldir and tell him the named library -lMagick++ without the prefix lib and the suffix .a. Of course the compiler must know the location of the header files.

In Eclipse you can configure it by right clicking on your project and a click on "Properties". Under "C/C++ Build" -> "Settings" -> "Tool settings" you can configure your header file locations ("GCC C++ Compiler"->"Directories") and the library paths ("MacOS X C++ Linker" -> "Libraries" on my computer).
Post Reply