Bootstrap

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]

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;