我正在使用自动工具来编译我的源代码,
$:~/Temp/cproject$ autoscan
$:~/Temp/cproject$ ls
autoscan.log configure.scan main.cpp
$:~/Temp/cproject$ mv configure.scan configure.ac
$:~/Temp/cproject$ aclocal
$:~/Temp/cproject$ automake --add-missing
configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal)
automake: error: no 'Makefile.am' found for any configure outputconfigure.ac文件内容如下:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([main.cpp])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_OUTPUT我的程序有什么问题?为什么会出现这些错误?谢谢!
发布于 2017-01-27 12:39:10
您没有使用automake宏,所以automake当然会失败。这里的问题是autoscan is buggy and not useful。
我可以向你推荐我的basic tutorial,以获得对autotools的默认基本支持,如果这是你正在寻找的。
https://stackoverflow.com/questions/41872877
复制相似问题