Autoconf / Automake”配置。ac:2:选择−墙不承认”

时间:2023-01-28 02:11:29

I'm trying to start with autoconf / automake for a new project. To get started, I'm reading "Using GNU Autotools" and trying to build the Hello-World-Tutorial.

我想从autoconf / automake开始做一个新项目。首先,我正在阅读“使用GNU自动工具”并尝试构建hello - world教程。

The required files from page 96 (real Page=105 because it's a LaTeX-Presentation) configure.ac, Makefile.am and src/Makefile.am look exactly as stated in the document.

第96页所需的文件(真实页=105,因为它是一个latex表示)配置。ac,Makefile。我和src / Makefile。与文件中所描述的完全一致。

After that I tried:

之后我尝试:

$ autoreconf --install
configure.ac:2: option `−Wall' not recognized
autoreconf: automake failed with exit status: 1

Well, it seems that automake doesn't like the second line:

看来automake不喜欢第二行:

AM_INIT_AUTOMAKE([−Wall −Werror foreign])

Therefore I executed:

因此我执行:

$ autoreconf -v --install
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:2: option `−Wall' not recognized
autoreconf: automake failed with exit status: 1

You can see easily that autoconf runs automake --add-missing --copy --no-force which I repeated with the verbose-option. And it only returns this:

您可以很容易地看到autoconf运行automake -add-missing -copy -no-force,我在verbose选项中重复了这一点。它只返回:

$ automake -v --add-missing --copy --no-force 
automake: thread 0: reading autoconf --trace=_LT_AC_TAGCONFIG:\$f:\$l::\$d::\$n::\${::}% --trace=AM_ENABLE_MULTILIB:\$f:\$l::\$d::\$n::\${::}% --trace=AM_SILENT_RULES:\$f:\$l::\$d::\$n::\${::}% --trace=AC_INIT:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_IF:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_FILES:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_TARGET:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_LIBOBJ_DIR:\$f:\$l::\$d::\$n::\${::}% --trace=AC_FC_SRCEXT:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_HOST:\$f:\$l::\$d::\$n::\${::}% --trace=AM_GNU_GETTEXT:\$f:\$l::\$d::\$n::\${::}% --trace=AC_LIBSOURCE:\$f:\$l::\$d::\$n::\${::}% --trace=AM_INIT_AUTOMAKE:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CANONICAL_BUILD:\$f:\$l::\$d::\$n::\${::}% --trace=AM_AUTOMAKE_VERSION:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_SUBST_NOTMAKE:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_AUX_DIR:\$f:\$l::\$d::\$n::\${::}% --trace=sinclude:\$f:\$l::\$d::\$n::\${::}% --trace=AM_PROG_CC_C_O:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_LINKS:\$f:\$l::\$d::\$n::\${::}% --trace=AC_REQUIRE_AUX_FILE:\$f:\$l::\$d::\$n::\${::}% --trace=m4_sinclude:\$f:\$l::\$d::\$n::\${::}% --trace=LT_SUPPORTED_TAG:\$f:\$l::\$d::\$n::\${::}% --trace=AM_CONDITIONAL:\$f:\$l::\$d::\$n::\${::}% --trace=AC_CONFIG_HEADERS:\$f:\$l::\$d::\$n::\${::}% --trace=AM_MAINTAINER_MODE:\$f:\$l::\$d::\$n::\${::}% --trace=m4_include:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_ELSE:\$f:\$l::\$d::\$n::\${::}% --trace=AM_GNU_GETTEXT_INTL_SUBDIR:\$f:\$l::\$d::\$n::\${::}% --trace=_AM_COND_ENDIF:\$f:\$l::\$d::\$n::\${::}% --trace=AC_SUBST_TRACE:\$f:\$l::\$d::\$n::\${::}%
configure.ac:2: option `−Wall' not recognized

Anybody an idea why this doesn't work? My impression is that none of my files are wrong...

有人知道为什么这个行不通吗?我的印象是我的文件都没有错……

I would like to use it for compiling C++ code for Linux and Windows (using mingw32-g++). Do you know any base where to start and what I have to pay attention for?

我想用它来编译Linux和Windows的c++代码(使用mingw32-g++)。你知道从哪里开始,我要注意什么吗?

I'm on Ubuntu 9.10 64bit.

我用的是Ubuntu 9.10 64位。

Any help is appreciated. Thanks in advance, regards

任何帮助都是感激。提前谢谢,问候

1 个解决方案

#1


6  

I suspect it's an encoding problem: the character (that you used in front of Wall) is not the ASCII - character that you should be using.

我怀疑这是一个编码问题:字符−(你使用前面的墙)不是ASCII字你应该使用。

#1


6  

I suspect it's an encoding problem: the character (that you used in front of Wall) is not the ASCII - character that you should be using.

我怀疑这是一个编码问题:字符−(你使用前面的墙)不是ASCII字你应该使用。