【问题标题】:variable not declared in this scope - Mingw w64未在此范围内声明的变量-Mingw w64
【发布时间】:2015-03-18 22:48:27
【问题描述】:

我在 Mingw 64 位中遇到此错误

 error: '_controlfp' was not declared in this scope

我尝试使用包含float.h

#include <float.h>

这是我的声明

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

但是我仍然遇到这个问题。我还添加了 mingw 包含目录的路径作为搜索的第一个路径。有关如何解决此问题的任何建议。

【问题讨论】:

    标签: c++ mingw-w64


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-18
      • 2017-02-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多