Setting up ImageMagick on xCode 4.3.3 tutorial

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
julius
Posts: 6
Joined: 2012-07-11T06:11:56-07:00
Authentication code: 13

Setting up ImageMagick on xCode 4.3.3 tutorial

Post by julius »

Hello.

I installed ImageMagick through MacPorts. Installation was successful, but what to do now? How to set up it on xCode to work? I haven't found any info about it. Maby somebody knows good tutorial? Or maby someone can explain it to me step by step?

Thanks in advance
julius
Posts: 6
Joined: 2012-07-11T06:11:56-07:00
Authentication code: 13

Re: Setting up ImageMagick on xCode 4.3.3 tutorial

Post by julius »

Ok, so I tried to guess what I should do, so I added to my xCode project build settings /opt/local/include/ImageMagick to Header Search Paths, and /opt/local/lib to Library Search Paths. But whats next? I include .h file to my code with #include <Magick++.h>, but then there comes 3 errors:

1st .

Code: Select all

Include.h
Unknown type name 'namespace'
at namespace MagickCore

2nd.

Code: Select all

Include.h
Expected ';' after top level declarator
at namespace MagickCore

3rd.

Code: Select all

Image.h
'string' file not found
at #include <string>


Is it only for me so difficult to use ImageMagick?
julius
Posts: 6
Joined: 2012-07-11T06:11:56-07:00
Authentication code: 13

Re: Setting up ImageMagick on xCode 4.3.3 tutorial

Post by julius »

Solved that. Now I'm having issues with linking ImageMagick libraries. At xCode's project's Library Search Path this:

Code: Select all

/opt/local/lib
, but it doesn't find's needed libraries. When I'm trying to build it I get these errors:

Code: Select all

Undefined symbols for architecture x86_64:
  "Magick::Image::Image(std::string const&)", referenced from:
      -[oglView imageMagick] in oglView.o
  "Magick::Image::~Image()", referenced from:
      -[oglView imageMagick] in oglView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Post Reply