Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/161.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Boost 1.65.1中可能存在的错误。运行bootstrap.bat gcc时_C++_C_Gcc_Boost - Fatal编程技术网

C++ Boost 1.65.1中可能存在的错误。运行bootstrap.bat gcc时

C++ Boost 1.65.1中可能存在的错误。运行bootstrap.bat gcc时,c++,c,gcc,boost,C++,C,Gcc,Boost,在运行bootstrap.bat gcc时,在提取它之后,我在bootstrap.log中发现了下一个错误: ... \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 [COMPI

在运行
bootstrap.bat gcc
时,在提取它之后,我在
bootstrap.log
中发现了下一个错误:

...
 \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\u 1\u 65\u 1\tools\build\src\engine>\bootstrap\jam0-f build.jam
--toolset=gcc”--工具集根=“
…找到161个目标。。。
…正在更新3个目标。。。
[MKDIR]bin.ntx86_64
[编译]bin.ntx86\u 64\b2.exe
debugger.c:在函数“debug\u start\u child”中:
调试器.c:1128:5:错误:
“for”循环初始声明仅在C99模式下允许
对于(int i=1;ivalue+self->size-1;
^
...
修改
boost\u 1\u 65\u 1\tools\build\src\engine\debugger.c:1128
我得到了一个正确的构建

我将编译命令跟踪到
boost\u 1\u 65\u 1\tools\build\src\engine\config\u toolset.bat:204
。因此,通过添加
--std=c99
我也可以解决这个问题(尽管我收到警告,编译失败)

我在
https://svn.boost.org/trac10/search?ticket=on

有经验的人能证实这一点吗?并在必要时报告

Windows 10-64位。 Mingw-w64(通用条款4.8.3)。
Boost 1.65.1。

此问题有一个错误报告:

我没有把它归档,但现在如果有人遇到这个问题并想知道它是否被报告了,它已经被报告了

同时,在解决这个问题的过程中,我认为最简单的方法就是如上面黑色箭头所示,转到文件:
boost\u 1\u 65\u 1\tools\build\src\engine\debugger.c
,第1128行,然后更改:

for ( int i = 1; i < argc; ++i )
for(int i=1;i
致:

inti;
对于(i=1;i

保存,然后运行<代码> BooStTAP GCC < /C> > /P> Boost是C++的东西,你可能不应该尝试用C编译器在任何模式下编译它:-你是对的。但是我添加了gcc选项,因为这是在Windows()和this()上开始的。gcc工具集适用于MinGW和Cygwin。当前的C标准是ISO/IEC 9899:2011,因此请尝试代码的C部分。如果这样做有效的话,你可以提交一个bug,它的构建脚本是brocken/old。我完全忘记了这一点。我提出申请,我在等待答复。谢谢,应该有参考资料。
int i;
for ( i = 1; i < argc; ++i )