centos 编译安装libuv(32位和64位)

xingyun86 2019-8-24 2475

1.下载libuv

git clone --recursive https://github.com/libuv/libuv.git

或者

wget https://github.com/libuv/libuv/archive/v1.31.0.tar.gz

最新版本可以在这个网站下载:
https://libuv.org/

2.编译libuv

yum install -y gcc gcc-c++ automake libtool

tar zxf libuv-v1.31.0.tar.gz
cd libuv

【动态库】
32位编译:./configure --enable-static=no --enable-shared=yes --prefix=/usr/local/
64位编译:./config CC="gcc -m64" CXX="g++ -m64" --enable-static=no --enable-shared=yes --prefix=/usr/local/

【静态库】
32位编译:./config --enable-static=yes --enable-shared=no --prefix=/usr/local/

64位编译:./config CC="gcc -m64" CXX="g++ -m64" --enable-static=yes --enable-shared=yes --prefix=/usr/local/

make
make install


×
打赏作者
最新回复 (0)
只看楼主
全部楼主
返回