使用自动工具编译共享库/插件时出现问题
我对 autotools 很陌生,看起来我对 libtool 有问题 - 它没有构建共享库,而是创建了一个静态库......
这就是我的 configure.ac 的样子:
AC_PREREQ([2.67])
AC_INIT([helloworld], [1.0], [...])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
# Checks for programs.
AC_PROG_CXX
AC_PROG_LIBTOOL
# Checks for header files.
AC_CHECK_HEADERS([alloca.h inttypes.h stdint.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
和 Makefile.am:
noinst_LTLIBRARIES=helloworld.la
helloworld_la_CXXFLAGS=-w -DLINUX ...
helloworld_la_LDFLAGS=-avoid-version -module -shared -export-dynamic
# List of source files
helloworld_la_SOURCES=helloworld.cpp ...
这里有什么问题吗?
感谢您的任何帮助。
I'm very new to autotools and it looks like I have a problem with libtool - it doesn't build a shared library and makes a static one instead...
This is how my configure.ac looks like:
AC_PREREQ([2.67])
AC_INIT([helloworld], [1.0], [...])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
# Checks for programs.
AC_PROG_CXX
AC_PROG_LIBTOOL
# Checks for header files.
AC_CHECK_HEADERS([alloca.h inttypes.h stdint.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
and Makefile.am:
noinst_LTLIBRARIES=helloworld.la
helloworld_la_CXXFLAGS=-w -DLINUX ...
helloworld_la_LDFLAGS=-avoid-version -module -shared -export-dynamic
# List of source files
helloworld_la_SOURCES=helloworld.cpp ...
Is there something wrong here?
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信你想要
使用 noinst 指示 libtool 构建一个便利的库,而那些
通常不共享。
I believe you want
Using noinst instructs libtool to build a convenience library, and those
are not typically shared.