C++ 错误C2039:“fabs”:不是“全局命名空间”的成员

C++ 错误C2039:“fabs”:不是“全局命名空间”的成员,c++,visual-studio,winapi,C++,Visual Studio,Winapi,我的项目编译得很好,即使完全重建,然后我在对话框资源中修改了一个参数,现在它甚至更改回参数也无法编译,我有很多错误,首先是: 1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(24,18): error C2039: 'fabs': is not a member of '`global namespace'' 1>C:\Program

我的项目编译得很好,即使完全重建,然后我在对话框资源中修改了一个参数,现在它甚至更改回参数也无法编译,我有很多错误,首先是:

1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(24,18): error C2039: 'fabs': is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(24,22): error C3861: 'fabs': identifier not found
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(28,18): error C2039: 'fabsf': is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(28,23): error C3861: 'fabsf': identifier not found
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(32,18): error C2039: 'fabsl': is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cstdlib(32,23): error C3861: 'fabsl': identifier not found
在cmath中还有:

1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cmath(31,18): error C2039: 'acosf': is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cmath(31,23): error C3861: 'acosf': identifier not found
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cmath(35,18): error C2039: 'acoshf': is not a member of '`global namespace''
1>C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include\cmath(35,24): error C3861: 'acoshf': identifier not found
因为它在微软的文件中,我看不出我能做什么


编辑:如果我在cmath中选择go to definition(转到定义),似乎所有这些函数都没有声明,因为“需要的函数”没有定义,也许这会有所帮助。

当我修改资源后出现问题,我发现没有声明fabs,因为“需要的函数”没有设置为1,我检查了原始项目中提交的resource.h文件,发现许多定义行(其中一行包含define\u CRT\u函数)需要0


我注释掉了所有的行,取消了缺少的定义的注释,并且我能够编译。

您是否还有其他错误,或者只有这一个错误?有时,如果您遇到一个简单的代码问题,编译器将无法工作并抛出大量其他错误。在这些错误之前,我没有错误,仅在cstdlib和cmath中。如果您使用的函数没有std::scope,那么在此之前您应该有错误。如果你碰巧没有,那没关系。解决这个问题。注意:您可能希望使用而不是从C继承的global::fabs。C版本总是采用双精度,因此对于float和long double,您将支付升级或截断的费用。STD::FAB版本对于不同类型的负载是超载的。@恳求改变对话框资源中的任何东西不会触发C++代码的重新编译,所以您也必须在别处改变其他东西。试着找出其他东西是什么,在哪里。