Solution to php compilation iconv error: 1. Use "make ZEND_EXTRA_LIBS='-liconv'" instead when making; 2. Add "EXTRA_LIBS = ..... -lcrypt -liconv".
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer
What should I do if there is an iconv error when compiling php?
Solution to iconv error encountered when compiling php5
The first method:
When making, use make ZEND_EXTRA_LIBS='- liconv' instead
The second method is more troublesome
http://rental.zhupiter.com/postshow_273_1_1.html
If an error message such as "undefined reference to `libiconv_open'" appears when installing PHP into the system, it means that in ". /configure" failed to capture some environment variable values. The error occurred when creating "-o sapi/cli/php", and the iconv function library parameter to be linked was not given.
The quick solution is:
VI Makefile about line 70:
EXTRA_LIBS = ..... -lcrypt
Add -liconv at the end, for example:
EXTRA_LIBS = ..... -lcrypt -liconv
Then Just make again.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of What to do if Iconv error occurs when compiling PHP. For more information, please follow other related articles on the PHP Chinese website!