首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

用vc++6.0执行《圣剑英雄传2》源代码出现的有关问题

2012-10-15 
用vc++6.0执行《圣剑英雄传2》源代码出现的问题用vc++6.0执行《圣剑英雄传2》源代码,编译错误为:\source\gamel

用vc++6.0执行《圣剑英雄传2》源代码出现的问题
用vc++6.0执行《圣剑英雄传2》源代码,编译错误为:\source\gamelib\gp_input.h(176) : error C2146: syntax error : missing ';' before identifier 'g_pDI' 
\source\gamelib\gp_input.h(176) : error C2501: 'g_pDI' : missing storage-class or type specifiers\source\gamelib\gp_music.h(9) : fatal error C1083: Cannot open include file: 'dmusicc.h': No such file or directory 
改正:static LPDIRECTINPUT7 g_pDI; 
改为――》》static LPDIRECTINPUT g_pDI;(即去掉了“7”) 
编译错误变为: 
source\gamelib\gp_music.h(9) : fatal error C1083: Cannot open include file: 'dmusicc.h': No such file or directory 
  后来安装了DXSDK_Aug08,编译时又多了几个错误: 
include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 
\dxsdk_aug08(sdk)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' \dxsdk_aug08(sdk)\include\dsound.h(305) :error C2501: 'DWORD_PTR' : missing storage-class or type specifiers \dxsdk_aug08(sdk)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers \dxsdk_aug08(sdk)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2' \dxsdk_aug08(sdk)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers 
\dxsdk_aug08(sdk)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers \source\gamelib\gp_music.h(9) : fatal error C1083: Cannot open include file: 'dmusicc.h': No such file or directory 
望高手指点。
问题补充:http://www.vscodes.com/soft/softdown.asp?softid=548 
是《圣剑英雄传2》源代码 下载地址

[解决办法]
open include file: 'dmusicc.h': No such file or directory 

明显你是缺文件,你的dx是什么版本,好像2007.8月以后的版本就没有DirectMusic

所以你要安装个 剑英雄传2 使用的dx版本



[解决办法]
恩,DirectX版本不对,看代码应该是Direct7,楼主下个装上吧
[解决办法]
圣2是零零年左右的游戏了。
那个时候的DX版本你看下他的说明,去找老版本的DX再编译下试试。
[解决办法]
圣剑英雄传1偶好像玩过~~~吼吼

热点排行