Boost 1.65.1中可能存在的错误。运行bootstrap.bat GCC
而在提取之后运行bootstrap.bat gcc
我bootstrap.log
得到了一个错误:Boost 1.65.1中可能存在的错误。运行bootstrap.bat GCC
...
\boost_1_65_1\tools\build\src\engine>.\bootstrap\jam0 -f build.jam
--toolset=gcc "--toolset-root= "
...found 161 targets...
...updating 3 targets...
[MKDIR] bin.ntx86_64
[COMPILE] bin.ntx86_64\b2.exe
debugger.c: In function 'debug_start_child':
debugger.c:1128:5: error:
'for' loop initial declarations are only allowed in C99 mode
for (int i = 1; i < argc; ++i)
^
debugger.c:1128:5: note: use option -std=c99 or -std=gnu99 to compile your code
strings.c: In function 'string_rtrim':
strings.c:195:5: warning: ISO C90 forbids mixed declarations and code
[-Wpedantic]
char * p = self->value + self->size - 1;
^
...
修改boost_1_65_1\tools\build\src\engine\debugger.c:1128
我得到一个正确的版本。
我跟踪编译命令为boost_1_65_1\tools\build\src\engine\config_toolset.bat:204
。所以通过加入--std=c99
我也可以解决它(虽然我得到警告和编译失败)。我想在https://svn.boost.org/trac10/search?ticket=on
找不到报告。
有更多经验的人可以证实吗?并在必要时报告。
Windows 10 - 64bits。 Mingw-w64(gcc 4.8.3)。 提升1.65.1。
没有针对此问题的bug报告:https://svn.boost.org/trac10/ticket/13252
我没有文件,但现在如果有人遇到这个问题,想知道它已经报道,它有。
在此期间,同时它被处理,我认为要获得最简单的方式过去,它是黑箭上述建议,去文件:boost_1_65_1\tools\build\src\engine\debugger.c
,线1128和更改:
for (int i = 1; i < argc; ++i)
于:
int i;
for (i = 1; i < argc; ++i)
保存它,然后运行bootsrtap gcc
我完全忘了这个。我提交了,我正在等待答案。谢谢,应该有一个参考。 –
升压是*** C++ ***的事情,你可能不应该试图在*任何*模式下的C编译器来编译: - ) – paxdiablo
你说得对。但是我添加了gcc选项,因为这个Windows入门(http://www.boost.org/doc/libs/1_62_0/more/getting_started/windows.html)和这个(https://gist.github。 COM/sim642/29caef3cc8afaa273ce6)。 gcc工具集适用于MinGW和Cygwin。 –
当前C标准是ISO/IEC 9899:2011,所以请在代码的C部分尝试使用'--std = c11'。如果可行,你可以提交一个构建脚本是brocken/old的bug。 – deamentiaemundi