Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为我的项目使用 GNU 自动工具(包括 automake!)。我想知道是否可以使用 libtool 创建静态库和共享库?或者声明是分开的?这会:
LT_INIT(shared static)
工作?
除此之外什么都不LT_INIT需要,它默认构建静态库和共享库。如果您愿意,您可以再次明确声明默认值(但这有点多余)
LT_INIT
LT_INIT AC_ENABLE_SHARED AC_ENABLE_STATIC
编辑:手册说LT_INIT([shared])和LT_INIT([static])(结合起来LT_INIT([shared static])也可以工作。另外,手册对LT_INIT给出的默认值更准确的措辞: 如果共享库可用,此宏将打开共享库,如果它们不与共享库冲突,也会启用静态库.
LT_INIT([shared])
LT_INIT([static])
LT_INIT([shared static])