zoukankan      html  css  js  c++  java
  • Directx11 xnamath.h 报错

    xnamath.h 报错: 在标识符“XMConvertToRadians”的前面

    如下报错

    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2146: 语法错误: 缺少“;”(在标识符“XMConvertToRadians”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2433: “FLOAT”: 不允许在数据声明中使用“__forceinline”
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2146: 语法错误: 缺少“)”(在标识符“fDegrees”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2059: 语法错误:“)”
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2146: 语法错误: 缺少“;”(在标识符“XMConvertToDegrees”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2433: “FLOAT”: 不允许在数据声明中使用“__forceinline”
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2086: “int FLOAT”: 重定义
    1> d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(159) : 参见“FLOAT”的声明
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2146: 语法错误: 缺少“)”(在标识符“fRadians”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2059: 语法错误:“)”
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
    1>d:program filesmicrosoft directx sdk (june 2010)includexnamath.h(160): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)

    解决方法

    将 #include <xnamath.h>头文件放到 

    #include <D3D11.h>
    #include <d3dx11.h>
    #include <DxErr.h>
    #include <D3DCompiler.h> // for shader flags

    的后面即可。

  • 相关阅读:
    C# 5.0 in a Nutshell 读书笔记(一) 野峰
    CLR via C# 4th Edition 野峰
    杰佛里给 Windows Server 2019 Automation with PowerShell 一书所写序言 野峰
    .NET的跨平台调用一例(PreserveSig) 野峰
    Http请求响应
    为什么不要追随新的linux发行版
    make: *** [out/host/linuxx86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtestall.o] Error change
    linux 下at&t语法的汇编之hello world!!
    android 编译错误001_cm9 for onda elite vi10
    把vim当作16进制编辑器使用、、
  • 原文地址:https://www.cnblogs.com/zhangbaochong/p/5478863.html
Copyright © 2011-2022 走看看