【发布时间】:2014-09-17 06:00:18
【问题描述】:
我有大约 80 个静态库。我想从中创建一个静态库。
This answer 对我不起作用,因为我收到以下错误:
libtool: unrecognized option `-static'
我也很困惑它需要在哪种模式下完成。是“链接”还是“安装” 既然有20多个库,我也可以用“*”来指定所有吗?
我没有在文档中找到任何信息,除了 this,它并没有真正回答我的问题。
仅供参考..这些是模式:
MODE must be one of the following:
clean remove files from the build directory
compile compile a source file into a libtool object
execute automatically set library path, then run a program
finish complete the installation of libtool libraries
install install libraries or executables
link create a library or an executable
uninstall remove libraries from an installed directory
【问题讨论】:
-
要使用
libtool创建一个静态库,所有这80个静态库都必须使用libtool --mode=compile而不是普通的gcc编译。另外,您能否分享一下which libtool和ls -l <the path output in the which libtool command>的输出