C++ 变量未在此范围内声明-Mingw w64

C++ 变量未在此范围内声明-Mingw w64,c++,mingw-w64,C++,Mingw W64,我在Mingw 64位中得到了这个错误 error: '_controlfp' was not declared in this scope 我尝试使用 #include <float.h> 然而,我仍然得到这个问题。此外,我还将该路径添加到mingw的include目录中,作为搜索的第一个路径。关于如何解决此问题的任何建议。此定义存在于float.h中。似乎mingw64试图在C:\mingw64\x86\u 64-w64-mingw32\include中的float.h中查

我在Mingw 64位中得到了这个错误

 error: '_controlfp' was not declared in this scope
我尝试使用

#include <float.h>

然而,我仍然得到这个问题。此外,我还将该路径添加到mingw的include目录中,作为搜索的第一个路径。关于如何解决此问题的任何建议。

此定义存在于float.h中。似乎mingw64试图在
C:\mingw64\x86\u 64-w64-mingw32\include
中的float.h中查找此定义,但此定义存在于文件“C:\mingw64\x86\u 64-w64-mingw32\include”中。为了解决这个问题,我将定义复制到实际的源文件中

 uint32_t old;
_controlfp_s(&old, _PC_64, _MCW_PC);