gpt4 book ai didi

c++ - 在 Fedora 上编译 C++ 程序

转载 作者:太空宇宙 更新时间:2023-11-04 05:55:38 26 4
gpt4 key购买 nike

我在 Fedora 上编译开源 C++ 项目时遇到问题。当我下载并运行 ./configure 时,我最终得到......

.
.
.
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
./configure: line 15513: AX_CFLAGS_WARN_ALL: command not found
./configure: line 15514: AX_CXXFLAGS_WARN_ALL: command not found
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking for bison... bison
./configure: line 15784: AX_PROG_GPERF: command not found
checking trace option enabled... no
checking for getrusage... yes
checking time profiling enabled... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking forcing use of select... no
checking use pipes to communication between scheduler and dispatcher... no
./configure: line 16280: syntax error near unexpected token `1.39.0'
./configure: line 16280: `AX_BOOST_BASE(1.39.0)'

当我在 Windows 中编译等效项目时,我确实需要安装和更新对 Boost 的项目引用。我可以看到这与 boost 有关,但不确定为什么会出现语法错误。

还有一些需要注意的事情,configure和configure.ac中的原始源代码引用了具有相同编译错误的boost 1.3.5(显然错误消息中包含1.3.5)。

我最近安装了 boost 1.3.9 并更新了源代码。另请注意,当我尝试

 yum install boost

它报告我安装了 1.3.7,这是最新版本。我也在源代码中尝试了 1.3.7,但遇到了同样的问题。我只是不明白为什么会出现语法错误!

这是configure和configre.ac中抛出错误的代码

#BOOST
AX_BOOST_BASE(1.39.0)
AX_BOOST_THREAD

任何关于下一步该去哪里的想法都会很好。

TIA

G

最佳答案

我认为您的“开源项目”需要更高版本的 autoconf/aclocal比安装的版本。

'AX_CFLAGS _WARN _ALL', ..., 'AX _BOOST _BASE' 都是 autoconf 宏,如果您有更新版本的 autoconf,将会正确扩展。

关于c++ - 在 Fedora 上编译 C++ 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1060991/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com