C++学习(三六七)configure动态库 静态库

--enable-shared=no --enable-static=yes (静态)

--enable-shared=yes --enable-static=no (动态)

如果不做任何设置,则动态库与静态库同时生成

例子

./configure CC=amr-linu-gcc --target=arm-linux --host=arm-linux-gcc --prefix=/usr/local/iconv --enable-shared --enable-static

config.log中会有类似这样的语句

configure:14433: checking whether to build shared libraries
configure:14458: result: yes
configure:14461: checking whether to build static libraries
configure:14465: result: no

./configure --help中有一段话,说明默认是动态库和静态都要构建的。

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-shared[=PKGS]  build shared libraries [default=yes]
  --enable-static[=PKGS]  build static libraries [default=yes]
  --enable-fast-install[=PKGS]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值