Windows游戏编程大师技巧 源码编译错误
Windows游戏编程大师技巧 源码
在T3DCHAP09文件夹
demo9_2a.cpp
使用VC6。0 安装了directx 9 SDK
编译通过
但是连接时出现错误
错误如下
demo9_2a.obj : error LNK2001: unresolved external symbol "struct IDirectDrawClipper * lpddclipper" (?lpddclipper@@3PAUIDirectDrawClipper@@A)
demo9_2a.obj : error LNK2001: unresolved external symbol "struct IDirectDrawClipper * __cdecl DDraw_Attach_Clipper(struct IDirectDrawSurface7 *,int,struct tagRECT *)" (?DDraw_Attach_Clipper@@YAPAUIDirectDrawClipper@@PAUIDirectDrawSurface7@@HPAUtagRE
CT@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int screen_width" (?screen_width@@3HA)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Load_Image_Bitmap(struct BITMAP_IMAGE_TYP *,struct BITMAP_FILE_TAG *,int,int,int)" (?Load_Image_Bitmap@@YAHPAUBITMAP_IMAGE_TYP@@PAUBITMAP_FILE_TAG@@HHH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Create_Bitmap(struct BITMAP_IMAGE_TYP *,int,int,int,int,int)" (?Create_Bitmap@@YAHPAUBITMAP_IMAGE_TYP@@HHHHH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Load_Frame_BOB(struct BOB_TYP *,struct BITMAP_FILE_TAG *,int,int,int,int)" (?Load_Frame_BOB@@YAHPAUBOB_TYP@@PAUBITMAP_FILE_TAG@@HHHH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Create_BOB(struct BOB_TYP *,int,int,int,int,int,int,int,unsigned short,int)" (?Create_BOB@@YAHPAUBOB_TYP@@HHHHHHHGH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "struct IDirectDrawSurface7 * lpddsprimary" (?lpddsprimary@@3PAUIDirectDrawSurface7@@A)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Fill_Surface(struct IDirectDrawSurface7 *,unsigned short,struct tagRECT *)" (?DDraw_Fill_Surface@@YAHPAUIDirectDrawSurface7@@GPAUtagRECT@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "struct IDirectDrawSurface7 * lpddsback" (?lpddsback@@3PAUIDirectDrawSurface7@@A)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Set_Palette(struct tagPALETTEENTRY *)" (?Set_Palette@@YAHPAUtagPALETTEENTRY@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Load_Bitmap_File(struct BITMAP_FILE_TAG *,char *)" (?Load_Bitmap_File@@YAHPAUBITMAP_FILE_TAG@@PAD@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "struct BITMAP_FILE_TAG bitmap8bit" (?bitmap8bit@@3UBITMAP_FILE_TAG@@A)
demo9_2a.obj : error LNK2001: unresolved external symbol "int screen_height" (?screen_height@@3HA)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Init(int,int,int,int)" (?DDraw_Init@@YAHHHHH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Shutdown(void)" (?DDraw_Shutdown@@YAHXZ)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Destroy_Bitmap(struct BITMAP_IMAGE_TYP *)" (?Destroy_Bitmap@@YAHPAUBITMAP_IMAGE_TYP@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Destroy_BOB(struct BOB_TYP *)" (?Destroy_BOB@@YAHPAUBOB_TYP@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Unload_Bitmap_File(struct BITMAP_FILE_TAG *)" (?Unload_Bitmap_File@@YAHPAUBITMAP_FILE_TAG@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Wait_Clock(unsigned long)" (?Wait_Clock@@YAKK@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Flip(void)" (?DDraw_Flip@@YAHXZ)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Text_GDI(char *,int,int,unsigned long,struct IDirectDrawSurface7 *)" (?Draw_Text_GDI@@YAHPADHHKPAUIDirectDrawSurface7@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_BOB(struct BOB_TYP *,struct IDirectDrawSurface7 *)" (?Draw_BOB@@YAHPAUBOB_TYP@@PAUIDirectDrawSurface7@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Rectangle(int,int,int,int,int,struct IDirectDrawSurface7 *)" (?Draw_Rectangle@@YAHHHHHHPAUIDirectDrawSurface7@@@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl DDraw_Unlock_Back_Surface(void)" (?DDraw_Unlock_Back_Surface@@YAHXZ)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Bitmap(struct BITMAP_IMAGE_TYP *,unsigned char *,int,int)" (?Draw_Bitmap@@YAHPAUBITMAP_IMAGE_TYP@@PAEHH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "unsigned char * back_buffer" (?back_buffer@@3PAEA)
demo9_2a.obj : error LNK2001: unresolved external symbol "int back_lpitch" (?back_lpitch@@3HA)
demo9_2a.obj : error LNK2001: unresolved external symbol "unsigned char * __cdecl DDraw_Lock_Back_Surface(void)" (?DDraw_Lock_Back_Surface@@YAPAEXZ)
demo9_2a.obj : error LNK2001: unresolved external symbol "int __cdecl Draw_Pixel(int,int,int,unsigned char *,int)" (?Draw_Pixel@@YAHHHHPAEH@Z)
demo9_2a.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl Start_Clock(void)" (?Start_Clock@@YAKXZ)
t3dlib2.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20
t3dlib2.obj : error LNK2001: unresolved external symbol _c_dfDIJoystick
t3dlib2.obj : error LNK2001: unresolved external symbol _c_dfDIMouse
t3dlib2.obj : error LNK2001: unresolved external symbol _c_dfDIKeyboard
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/demo9_2a.exe : fatal error LNK1120: 36 unresolved externals
执行 link.exe 时出错.
demo9_2a.exe - 1 error(s), 0 warning(s)
那位大虾来指点下
本人刚开始学游戏编程基础
先谢了
不好意思,我很久没来论坛了
只剩 5 分。。