游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1875|回复: 2

VS2005中DXUT在加入Animesh。h为什么会出现未定义类

[复制链接]

14

主题

46

帖子

50

积分

注册会员

Rank: 2

积分
50
发表于 2010-12-11 02:20:00 | 显示全部楼层 |阅读模式
>AnimMesh.cpp
1>d:\学习\c++\vs\mygame\animmesh.cpp(12) : error C2653: 'CAnimMesh' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\animmesh.cpp(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\学习\c++\vs\mygame\animmesh.cpp(14) : error C2065: 'm_bPlayAnim' : undeclared identifier
1>d:\学习\c++\vs\mygame\animmesh.cpp(15) : error C2065: 'm_pd3dDevice' : undeclared identifier
1>d:\学习\c++\vs\mygame\animmesh.cpp(16) : error C2065: 'm_pAnimController' : undeclared identifier
1>d:\学习\c++\vs\mygame\animmesh.cpp(17) : error C2065: 'm_pFrameRoot' : undeclared identifier
1>d:\学习\c++\vs\mygame\animmesh.cpp(19) : error C2065: 'm_pAlloc' : undeclared identifier
1>d:\学习\c++\vs\mygame\animmesh.cpp(19) : error C2061: syntax error : identifier 'CAllocateHierarchy'
1>d:\学习\c++\vs\mygame\animmesh.cpp(20) : warning C4508: 'CAnimMesh' : function should return a value; 'void' return type assumed
1>d:\学习\c++\vs\mygame\animmesh.cpp(26) : error C2653: 'CAnimMesh' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\animmesh.cpp(26) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>AllocateHierarchy.cpp
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(13) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(36) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(57) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(60) : error C2065: 'D3DXFRAME_DERIVED' : undeclared identifier
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(60) : error C2065: 'pFrame' : undeclared identifier
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(64) : error C2061: syntax error : identifier 'D3DXFRAME_DERIVED'
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(71) : error C2227: left of '->Name' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(74) : error C2541: 'delete' : cannot delete objects that are not pointers
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(79) : error C2227: left of '->TransformationMatrix' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(80) : error C2227: left of '->CombinedTransformationMatrix' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(82) : error C2227: left of '->pMeshContainer' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(83) : error C2227: left of '->pFrameSibling' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(84) : error C2227: left of '->pFrameFirstChild' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(96) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(106) : error C2065: 'D3DXMESHCONTAINER_DERIVED' : undeclared identifier
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(126) : error C2061: syntax error : identifier 'D3DXMESHCONTAINER_DERIVED'
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(131) : error C2070: ''unknown-type'': illegal sizeof operand
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(136) : error C2227: left of '->Name' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(139) : error C3861: 'DestroyMeshContainer': identifier not found
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(149) : error C2227: left of '->MeshData' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(149) : error C2228: left of '.Type' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(153) : error C2227: left of '->MeshData' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(153) : error C2228: left of '.pMesh' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(157) : error C3861: 'DestroyMeshContainer': identifier not found
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(161) : error C2227: left of '->MeshData' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(161) : error C2228: left of '.pMesh' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(166) : error C2227: left of '->MeshData' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(166) : error C2228: left of '.pMesh' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(167) : error C2227: left of '->MeshData' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(167) : error C2228: left of '.Type' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(172) : error C2227: left of '->NumMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(173) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(173) : error C2227: left of '->NumMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(174) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(174) : error C2227: left of '->NumMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(175) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(176) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(176) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(177) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(181) : error C3861: 'DestroyMeshContainer': identifier not found
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(185) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(186) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(186) : error C2227: left of '->NumMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(191) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2227: left of '->MatD3D' must point to class/struct/union/generic type
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2228: left of '.Ambient' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2227: left of '->MatD3D' must point to class/struct/union/generic type
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(192) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(197) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(197) : error C2228: left of '.pTextureFilename' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(202) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(202) : error C2228: left of '.pTextureFilename' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(204) : error C3861: 'DXUTFindDXSDKMediaFileCch': identifier not found
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(206) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(207) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(209) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(209) : error C2228: left of '.pTextureFilename' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(215) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(215) : error C2228: left of '.pTextureFilename' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(216) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(216) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(217) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(217) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(217) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(217) : error C2228: left of '.r' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(218) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(218) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(218) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(218) : error C2228: left of '.g' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(219) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(219) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(219) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(219) : error C2228: left of '.b' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2228: left of '.Specular' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(220) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2228: left of '.Ambient' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2228: left of '.MatD3D' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(221) : error C2228: left of '.Diffuse' must have class/struct/union
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(235) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(249) : error C2653: 'CAllocateHierarchy' : is not a class or namespace name
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(250) : error C2365: 'DestroyMeshContainer' : redefinition; previous definition was 'formerly unknown identifier'
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(256) : error C2059: syntax error : ')'
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(258) : error C2227: left of '->Name' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(258) : error C2227: left of '->Name' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(258) : error C2227: left of '->Name' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(259) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(259) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(259) : error C2227: left of '->pAdjacency' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(260) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(260) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(260) : error C2227: left of '->pMaterials' must point to class/struct/union/generic type
1>        type is ''unknown-type''
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(262) : error C2227: left of '->ppTextures' must point to class/struct/union/generic type
1>d:\学习\c++\vs\mygame\allocatehierarchy.cpp(262) : fatal error C1003: error count exceeds 100; stopping compilation




这些是错误,在未引入“AninMesh。h”可以编译通过,当引入了后,出现1>d:\学习\c++\vs\mygame\animmesh.cpp(171) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "DXUT.h"' to your source?
这样的错误,当我包含了“DXUT。h”后,就出现上面的问题。我检查了类加了;
请帮帮忙解决下

1

主题

110

帖子

110

积分

注册会员

Rank: 2

积分
110
发表于 2010-12-11 09:25:00 | 显示全部楼层

Re:VS2005中DXUT在加入Animesh。h为什么会出现未定义类

头文件重复包含,导致预处理将重复的头文件错误的移除。

14

主题

46

帖子

50

积分

注册会员

Rank: 2

积分
50
 楼主| 发表于 2010-12-11 15:56:00 | 显示全部楼层

Re:VS2005中DXUT在加入Animesh。h为什么会出现未定义类

可引入“Animesh.h”编译的时候出现>d:\学习\c++\vs\mygame\animmesh.cpp(171) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "DXUT.h"' to your source?
让包含“DXUT。h”这个该怎么解决?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-5-30 11:40

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表