【发布时间】:2016-05-08 19:23:38
【问题描述】:
我正在使用自动工具来配置和构建我的项目,该项目使用 dlopen 及其朋友。
我的根 configure.ac 中有以下 sn-p:
AC_SEARCH_LIBS([dlopen], [dl dld], [], [
AC_MSG_ERROR([unable to find the dlopen() function])
])
我从https://autotools.io/autoconf/finding.html得到的
该库是由 autotools 找到的:
checking for library containing dlopen... -ldl
但是,该库似乎没有添加到 $(LIBS),因为:
a_out_LDADD=-ldl
工作(即项目编译和运行),和
a_out_LDADD=$(LIBS)
没有(即undefined reference to 'dlopen')
我错过了什么?
【问题讨论】:
标签: shared-libraries autotools dlopen