IOS: ImageMagick compiler warnings in Xcode

I am using ImageMagick on an iOS project, however the library is deprecated because a previous developer used the source code for this. I am using Xcode 6.3.2 and I want to use Cocoapods to integrate ImageMagick into the project instead of copying the source files. However, when I integrate ImageMagick with Cocoapods, I get four compiler warnings.

This is the content of my pods file:

target 'MyProject' do
    pod 'ImageMagick', '6.8.8-9'
end

      

These are 4 warnings:

enter image description here

If I try to change the file I get this popup warning

enter image description here

And I cannot unlock the file, I get this other error

enter image description here

I am not familiar with ImageMagick.

How important are these warnings? Should I modify the .h file and set it up correctly? How can I unblock this file? Any ideas on what I should tweak to resolve these warnings?

Is this the way? It is wrong to modify a file inside Cocoapod.

+3


source to share


2 answers


CocoaPods already has a compiled version of ImageMagick. Therefore, you only need to define these macros for your purpose to hide the warnings. As I understand it, they won't change anything in ImageMagick, because it is already compiled.

So, open the settings Preprocessor Macros

for your goal, or you have multiple goals for the whole project:

settings



And add 2 variables for "Debug" and "Release":

MAGICKCORE_HDRI_ENABLE=0 MAGICKCORE_QUANTUM_DEPTH=16

variables

+1


source


You must set MAGICKCORE_QUANTUM_DEPTH

to 0, 16, 32 or 64 in the preprocessor macro.

You must also set MAGICKCORE_HDRI_ENABLE

in YES

orNO



To do this, you can either change your preprocessor macros to these values, or use the post install hook from CocoaPods to set them every time you start pod install

.

0


source







All Articles