游戏开发论坛

 找回密码
 立即注册
搜索
查看: 7910|回复: 15

各位帮我解决下编译出错的问题,谢谢了!

[复制链接]

5

主题

23

帖子

29

积分

注册会员

Rank: 2

积分
29
发表于 2006-11-21 10:47:00 | 显示全部楼层 |阅读模式
1.syntax error:missing';'befor  indentifier 'g_pIDirectInput'
2.fatal error Unexpected end of file found.
不知道这两个错误是什么意思,各位给点意见啊,谢谢了! [em24]

1

主题

18

帖子

18

积分

新手上路

Rank: 1

积分
18
发表于 2006-11-21 13:44:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

是不是在某个头文件中缺了}?

2

主题

429

帖子

435

积分

中级会员

Rank: 3Rank: 3

积分
435
发表于 2006-11-21 14:49:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

g_pIDirectInput 的前面缺少分号;

5

主题

23

帖子

29

积分

注册会员

Rank: 2

积分
29
 楼主| 发表于 2006-11-21 15:04:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

没缺啊,我检查过了,不是这个原因!谢谢给我意见!

15

主题

129

帖子

129

积分

注册会员

Rank: 2

积分
129
QQ
发表于 2006-11-21 20:00:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

崩溃,不是缺;而是前面的类型编译器看不明白,加上#include <dinput.h>

1万

主题

1万

帖子

2万

积分

管理员

中级会员

Rank: 9Rank: 9Rank: 9

积分
20737
发表于 2006-11-21 22:01:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

是不是找不到'g_pIDirectInput'的定义。

35

主题

370

帖子

376

积分

中级会员

Rank: 3Rank: 3

积分
376
发表于 2006-11-21 22:05:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

好象是楼上说的原因

0

主题

202

帖子

202

积分

中级会员

Rank: 3Rank: 3

积分
202
发表于 2006-11-22 00:33:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

<!-- faint -->

5

主题

23

帖子

29

积分

注册会员

Rank: 2

积分
29
 楼主| 发表于 2006-11-22 09:41:00 | 显示全部楼层

Re: 各位帮我解决下编译出错的问题,谢谢了!

具体的错误是这样的:
Compiling...
GameEngine_Input.cpp
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(109) : error C2011: '_D3DCOLORVALUE' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(128) : error C2011: '_D3DRECT' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(147) : error C2011: '_D3DVECTOR' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(416) : error C2011: '_D3DMATRIX' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(615) : error C2011: '_D3DLIGHTTYPE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(749) : error C2011: '_D3DSHADEMODE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(756) : error C2011: '_D3DFILLMODE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(778) : error C2011: '_D3DBLEND' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(807) : error C2011: '_D3DTEXTUREADDRESS' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(815) : error C2011: '_D3DCULL' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(822) : error C2011: '_D3DCMPFUNC' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(834) : error C2011: '_D3DFOGMODE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(858) : error C2011: '_D3DPRIMITIVETYPE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(878) : error C2011: '_D3DTRANSFORMSTATETYPE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\d3dtypes.h(896) : error C2011: '_D3DRENDERSTATETYPE' : 'enum' type redefinition
c:\program files\microsoft visual studio\vc98\include\dsound.h(370) : error C2061: syntax error : identifier 'LPD3DVECTOR'
c:\program files\microsoft visual studio\vc98\include\dsound.h(371) : error C2061: syntax error : identifier 'LPD3DVECTOR'
c:\program files\microsoft visual studio\vc98\include\dsound.h(373) : error C2061: syntax error : identifier 'LPD3DVECTOR'
c:\program files\microsoft visual studio\vc98\include\dsound.h(443) : error C2061: syntax error : identifier 'LPD3DVECTOR'
c:\program files\microsoft visual studio\vc98\include\dsound.h(448) : error C2061: syntax error : identifier 'LPD3DVECTOR'
c:\program files\microsoft visual studio\vc98\include\dsound.h(449) : error C2061: syntax error : identifier 'LPD3DVECTOR'
d:\directx\gameengine\gameengine_input\gameengine_input.h(5) : error C2146: syntax error : missing ';' before identifier 'g_pIDirectInput'
d:\directx\gameengine\gameengine_input\gameengine_input.h(5) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

TextureCone.exe - 23 error(s), 0 warning(s)

然后我把c:\program files\microsoft visual studio\vc98\include\d3dtypes.h  这个头文件删除后
就出现下面的错误:

Compiling...
main.cpp
should not include d3dtypes.h when compiling for DX8 or newer interfaces
d:\directx\gameengine\gameengine_input\gameengine_input.h(5) : error C2146: syntax error : missing ';' before identifier 'g_pIDirectInput'
d:\directx\gameengine\gameengine_input\gameengine_input.h(5) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

BasicLight.exe - 2 error(s), 0 warning(s)


然后我就不知道怎么改了
大家给我提点意见,到底要怎么改?谢谢~!

14

主题

71

帖子

71

积分

注册会员

Rank: 2

积分
71
发表于 2006-11-22 10:14:00 | 显示全部楼层

Re:各位帮我解决下编译出错的问题,谢谢了!

哥们我真愁!~~这么多看着我都木了!~~~
我自学C++刚到第2张  你不要打击我的信心好不好!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2026-1-25 23:21

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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