Solution to the problem of cannot find lz when cross-compiling under centos7

After installing codeblocks on the centos7 desktop version, I set up a cross-compilation environment, and the arm compiler path is placed in the following location:
/usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux

The first step: When compiling by using arm-linux-gnueabihf-g++, the problem of “cannot find lz” appears.
Later, Baidu needed to install the zlib-1.2.11.tar.gz compressed package when looking for information.
The Baidu network disk link of this compressed package is as follows:
https://pan.baidu.com/s/1XJBbGteSxuqBOr-6yFdlw
Extraction code: sazf
Step 2: This compressed package must be compiled into arm in centos7 through arm-linux-gnueabihf-g++ Series of libz*.
[root@localhost wget]# cd zlib
[root@localhost zlib]# ls
include lib share
[root@localhost zlib]# cd lib/
[root@localhost lib]# ls
libz.a libz.so libz.so.1 libz .so.1.2.11 pkgconfig

Finally, put the compiled libz* files into the installation path under the lib folder of the directory below arm:
/usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/arm-linux-gnueabihf
[ root@localhost arm-linux-gnueabihf]# ls
bin debug-root include lib libc

Step 3: Copy the zconf.h and zlib.h header files under zlib to include under /usr/local/arm/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/arm-linux-gnueabihf Header folder.

Finally, use the arm compiler through codeblocks, and the problem of cannot find lz is solved.

Guess you like

Origin blog.csdn.net/weixin_44881103/article/details/109504422