WSL(Ubuntu22.04)使用autotool构建库文件时遇到libtool无法正常使用的问题
- 错误信息:error: Libtool library used but ‘LIBTOOL’ is undefined
- 经过实践,解决方案如下:
- 检查安装libtool
sudo apt-get install libtool
- 在configure.ac中增加
LT_INIT
AC_CONFIG_MACRO_DIRS([m4])
- 执行命令
libtoolize
autoupdate
- 正常执行aclocal,autoheader,automake,autoconf,./configure make等命令
如有遗误,欢迎指正!