交叉编译中的静态链接库

Buildroot 配置

Target options

1

Toolchain

2

 

 

 

 

 

 

 

 

 

 

 

 

libuuid链接库

下载地址:wget http://skylineservers.dl.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz

 

./configure –prefix=/data/buildroot-2015.05/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/ –host=i686-linux CC=/data/buildroot-2015.05/output/host/usr/bin/i686-linux-gcc

make &&make install

 

libcurl链接库

下载地址 wget http://curl.haxx.se/download/curl-7.44.0.tar.gz

./configure –prefix=/data/buildroot-2015.05/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/ –host=i686-linux CC=/data/buildroot-2015.05/output/host/usr/bin/i686-linux-gcc

make &&make install

 

编译

./i686-linux-gcc /data/monitor.c  -L/data/buildroot-2015.05/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib -luuid -L/data/buildroot-2015.05/output/host/usr/i686-buildroot-linux-uclibc/sysroot/usr/lib -lcurl –static -o monitor

  1. 暂无评论

return top