Using Magick++ with XCode

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
DisplayQ
Posts: 1
Joined: 2012-03-28T07:38:50-07:00
Authentication code: 8675308

Using Magick++ with XCode

Post by DisplayQ »

I am preparing a project using Xcode 4.2.1 using both C++ and Objective-C (for the Mac interface). The reasons for using both languages aren't relevant. I have developed applications in iOS, but this is intended for OSX. I am not familiar with adding external libraries (i.e. not Apple's Frameworks) to Xcode projects, and haven't found much online (or in print) to help.
After installing and compiling ImageMagick-6.7.6-1, I intended to create a simple Command-Line project to test for a successful integration. I have tried adding the ImageMagick files to the project - both selecting "Copy Items into destination's group folder" and not. All I have done is to try to build the default "Hello World" app with #include <Magick++.h> added to the main.cpp file. The resulting issues (which prevent even that simple program to run) all indicate header files that cannot be found. The only one for the main.cpp file indicates
Magick++.h file not found
(This is the case for either angled bracket or quoted include statements.) The other issues are for all the coder module files (e.g. bmp.c) which indicate
magick/studio.h file not found
All these files are within the ImageMagick-6.7.6-1 folder. Generally Xcode searches within the folders added to projects. I have tried adding the file path to the various search paths. I can get the coder module file issues to disappear by removing those file references from the Compile Sources list, but I think I will need some of this functionality.
Is there anyone who has successfully added ImageMagick, and especially Magick++ to an Xcode project as an external library who might be able to steer me in the right direction? I have spent hours trying to find answers and have yet to get down to the real coding I need to do. Any suggestions would be appreciated.
RogerWillCode
Posts: 5
Joined: 2011-12-14T09:40:30-07:00
Authentication code: 8675308

Re: Using Magick++ with XCode

Post by RogerWillCode »

Did you ever figure this out? I am having the same issue when I do a manual install from Source. When I use macports, that problem goes away, so I am assuming that something is getting set (like an environment variable) that I don't see in the instructions. Hope that helps if you haven't figured it out already.
jheld
Posts: 3
Joined: 2014-06-11T06:13:11-07:00
Authentication code: 6789

Re: Using Magick++ with XCode

Post by jheld »

I'm sure you've moved on by now, but in your project settings you'll need to extend your header search paths to include where your ImageMagick source lives.
Post Reply