gcc笔记

来源:互联网 发布:apache下载安装 php 编辑:程序博客网 时间:2024/05/22 18:22

 

由于pthread库不是Linux系统默认的库,连接时需要使用库libpthread.a,所以在使用pthread_create创建线程时,在编译中要加-lpthread参数:
gcc -o pthread -lpthread pthread.c

 

用命令gcc -shared hello.c -o libhello.so编译为动态库。

 

64位下编译jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --enable-shared --enable-static
make
mkdir -p /usr/local/man/man1
make install

 

原创粉丝点击