1. First, add the corresponding header file of the ImageMagick library to the environment variable.
Copy Code code as follows:
Export C_include_path= $C _include_path:/usr/local/imagemagick/include/imagemagick/
The following path is different for everyone
Otherwise, you will receive the following error
Copy Code code as follows:
Wand/magickwand.h:no such file or directory
2. Add the corresponding library when linking
In the Obj/makefile file, locate the following line,
Copy Code code as follows:
OBJS/NGINX:OBJS/SRC/CORE/NGINX.O \
At the bottom of this add:
Copy Code code as follows:
' Pkg-config--cflags--libs magickwand '
Output the corresponding variable
Copy Code code as follows:
Export pkg_config_path=/usr/local/imagemagick/lib/pkgconfig/
Otherwise, make makes the following error:
Copy Code code as follows:
Undefined reference to ' magickwandgenesis '
Make
Make install on it.