系统头文件cmath,cstdlib报错

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): error C2589: “(”:“::”右边的非法标记
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): error C2146: 语法错误: 缺少“)”(在标识符“fabs”的前面)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): error C2066: 转换到函数类型是非法的
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): error C2059: 语法错误:“)”
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): error C2440: “类型转换”: 无法从“double”转换为“unknown-type (__cdecl *)(float)”
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cstdlib(18): note: 没有使该转换得以执行的上下文
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): error C2589: “(”:“::”右边的非法标记
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): error C2146: 语法错误: 缺少“)”(在标识符“acos”的前面)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): error C2066: 转换到函数类型是非法的
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): error C2059: 语法错误:“)”
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): error C2440: “类型转换”: 无法从“double”转换为“unknown-type (__cdecl *)(float)”
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\cmath(19): note: 没有使该转换得以执行的上下文1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\xlocnum(81): error C2589: “(”:“::”右边的非法标记
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\xlocnum(81): error C2062: 意外的类型“unknown-type”
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\include\xlocnum(81): error C2059: 语法错误:“)”

这种情况下,需要调整.cpp文件中的头文件引用顺序,例如

A.cpp中

#include X.h

#include Y.h

#include A.h

尝试调整一下X.h和Y.h和A.h的顺序

时间: 2024-10-31 23:56:17

系统头文件cmath,cstdlib报错的相关文章

使用maven多模块来构建系统时,spring初始化报错的问题

最近在实验maven结构的maven工程时,碰到一个问题,springbean总是初始化失败: Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\workspace\mavenweb\mavenweb-webapp\src\main\webapp\WEB-INF

Centos系统创建用户oracle后,用该用户登陆系统,页面加载报错GConf error

Linux 的 GConf error 解决办法 问题: Centos系统创建用户oracle后,用该用户登陆系统,页面加载报错,导致重新进入Centos系统后出现: GConf error:Failed to contact configuration server;some possible cause are that you need to enable TCP/IP networking for ORBIT or you have stale NFSlocks due to a sys

windows系统git使用zip命令报错解决方法

windows系统git使用zip命令报错解决方法 报错信息:zip command not found 解决方法 下载zip-3.0-bin.zip和bzip2-1.0.5-bin.zip压缩包 下载地址 文件拷贝 解压压缩包并把zip-3.0-bin.zip解压后的bin文件夹下的zip.exe文件和bzip2-1.0.5-bin.zip解压后的bin文件夹下的bzip2.dll文件统一放在本地git安装目录下 git 安装目录查看 where git 一般情况下安装目录是:C:\Progr

Struts2实现文件上传报错(四)

1.具体错误如下 2014-5-2 21:38:29 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 严重: Exception occurred during processing request: null java.lang.NullPointerException at com.you.file.upload.action.FileUploadAction.execute(FileUploadAction.java:56)

Struts2实现文件上传报错(一)

1.具体报错如下 2014-5-1 23:02:38 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [jsp] in context with path [/UploadFile] threw exception [An exception occurred processing JSP page /file.jsp at line 28 25: <table> 26

Struts2实现文件上传报错(二)

编译Lua时,出现这样的错误: gcc -O2 -Wall -DLUA_COMPAT_ALL -DLUA_USE_LINUX -c -o lua.o lua.clua.c:67:31: error: 查阅了一下,centOS上需要安装readline-devel ncurses-devel yum install readline-devel ncurses-devel 测试平台成功. [[email protected] lua-5.2.3]# make linux test cd src &

Struts2实现文件上传报错(三)

1.具体错误如下 usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } 2014-5-1 23:17:23 org.apache.catalina.core.AprLifecycleListener init 信息: Loaded APR based Apache Tomcat Native library 1.1.27 usin

centos系统,使用vnc登陆报错的解决方案

centos系统,使用vnc登陆报错 "The connection was refused by the host computer" 使用以下两个命令解决: [[email protected] ~]# rm /tmp/.X11-unix/X2 [[email protected] ~]# systemctl restart [email protected]:2.service

解决 xx.h has been modified since the precompiled header 系统头文件被修改

fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h' has been modified since the precompiled header '/Users/