游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3538|回复: 3

我是个初学者,哪位大虾帮我看看何处的错,怎解决??谢

[复制链接]

2

主题

10

帖子

12

积分

新手上路

Rank: 1

积分
12
发表于 2003-10-5 00:32:00 | 显示全部楼层 |阅读模式
刚开始学用OPENGL,照样改个引擎,编译错误如下:
Compiling...
engine.cpp
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(13) : error C2629: unexpected 'class CKeyboard ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(13) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(30) : error C2629: unexpected 'class CMouse ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(30) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2146: syntax error : missing ';' before identifier 'm_pDI'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2501: 'LPDIRECTINPUT9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2501: 'm_pDI' : missing storage-class or type specifiers
InputSystem.cpp
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(13) : error C2629: unexpected 'class CKeyboard ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(13) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(23) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(23) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(23) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(30) : error C2629: unexpected 'class CMouse ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(30) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(40) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(40) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(40) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(69) : error C2146: syntax error : missing ';' before identifier 'm_pDI'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(69) : error C2501: 'LPDIRECTINPUT9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.h(69) : error C2501: 'm_pDI' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(4) : error C2065: 'LPDIRECTINPUT9' : undeclared identifier
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(4) : error C2146: syntax error : missing ')' before identifier 'pDI'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(4) : error C2350: 'CKeyboard::CKeyboard::CKeyboard' is not a static member
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(4) : error C2059: syntax error : ')'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(5) : error C2143: syntax error : missing ';' before '{'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(5) : error C2447: missing function header (old-style formal list?)
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(27) : error C2065: 'm_pDIDev' : undeclared identifier
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(29) : error C2227: left of '->Unacquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(30) : error C2227: left of '->Release' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(37) : error C2227: left of '->Acquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(43) : error C2227: left of '->Unacquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(48) : error C2227: left of '->GetDeviceState' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(50) : error C2227: left of '->Acquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(54) : error C2227: left of '->GetDeviceState' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(62) : error C2146: syntax error : missing ')' before identifier 'pDI'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(62) : error C2350: 'CMouse::CMouse::CMouse' is not a static member
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(62) : error C2059: syntax error : ')'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(63) : error C2143: syntax error : missing ';' before '{'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(63) : error C2447: missing function header (old-style formal list?)
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(94) : error C2227: left of '->GetDeviceState' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(96) : error C2227: left of '->Acquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(100) : error C2227: left of '->GetDeviceState' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(112) : error C2227: left of '->Unacquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(113) : error C2227: left of '->Release' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(119) : error C2227: left of '->Acquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(124) : error C2227: left of '->Unacquire' must point to class/struct/union
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(135) : error C2065: 'DirectInput8Create' : undeclared identifier
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(135) : error C2065: 'IID_IDirectInput9' : undeclared identifier
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(135) : error C2065: 'm_pDI' : undeclared identifier
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\InputSystem.cpp(164) : error C2227: left of '->Release' must point to class/struct/union
oglwindow.cpp
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(13) : error C2629: unexpected 'class CKeyboard ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(13) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(23) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(30) : error C2629: unexpected 'class CMouse ('
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(30) : error C2238: unexpected token(s) preceding ';'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2146: syntax error : missing ';' before identifier 'm_pDIDev'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2501: 'LPDIRECTINPUTDEVICE9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(40) : error C2501: 'm_pDIDev' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2146: syntax error : missing ';' before identifier 'm_pDI'
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2501: 'LPDIRECTINPUT9' : missing storage-class or type specifiers
C:\Documents and Settings\zzpp\桌面\SIMPENGINE\inputsystem.h(69) : error C2501: 'm_pDI' : missing storage-class or type specifiers

world.cpp
Error executing cl.exe.

15

主题

129

帖子

129

积分

注册会员

Rank: 2

积分
129
发表于 2003-10-5 12:31:00 | 显示全部楼层

Re:我是个初学者,哪位大虾帮我看看何处的错,怎解决?

你有没有安装DX9的调试版本,如果有安装的话,是否在你的工程文件中,进行了链接,我用的VC6英文版,链接的方法是到Project->Settings->Link中增加相应的LIB文件

2

主题

10

帖子

12

积分

新手上路

Rank: 1

积分
12
 楼主| 发表于 2003-10-8 00:54:00 | 显示全部楼层

Re:我是个初学者,哪位大虾帮我看看何处的错,怎解决?

我增加相应的LIB文件,还是不行,怎办?

9

主题

53

帖子

53

积分

注册会员

Rank: 2

积分
53
发表于 2006-6-26 15:11:00 | 显示全部楼层

Re:我是个初学者,哪位大虾帮我看看何处的错,怎解决?

这个问题有没有解呀?我也遇到相同的问题.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2026-1-24 19:19

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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