1. First, add the corresponding header file of the imagemagick library to the environment variable
Copy the code The code is as follows:
export c_include_path=$c_include_path :/usr/local/imagemagick/include/imagemagick/
The following path depends on everyone’s situation
Otherwise, the following error will occur
Copy the code. The code is as follows:
wand/magickwand.h: no such file or directory
2. Add the corresponding library when linking
In the obj/makefile file, find the following line,
Copy the code The code is as follows:
objs/nginx: objs/src/core/nginx.o \
Add at the bottom of this:
Copy the code The code is as follows:
`pkg-config --cflags --libs magickwand`
Output the corresponding variables
Copy the code The code is as follows:
export pkg_config_path=/usr/local/imagemagick/lib/pkgconfig/
Otherwise, make The following error still occurs:
Copy code The code is as follows:
undefined reference to `magickwandgenesis'
make
Just make install
The above is the detailed content of How to compile the ImageMagic library into the nginx server. For more information, please follow other related articles on the PHP Chinese website!