|
……
BOOL InitKeyborad(){
HRESULT hr;
hr = DirectInput8Create(g_hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&pIDirectInput, NULL);
if(FAILED(hr)){
MessageBox(NULL, "建立IDIRECTINPUT8接口对象失败!","警告", MB_OK | MB_ICONINFORMATION);
return false;
}
……
--------------------Configuration: DX_Key - Win32 Debug--------------------
Linking...
code.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
Debug/DX_Key.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.
DX_Key.exe - 1 error(s), 0 warning(s)
……
这是从书上COPY的源码,应该没什么问题,但在编译是老是出这么个错 (XP SP2 + VC6.0)[em6]
另外,link和option里面我也设置过了的,SDK(dxsdk_feb2007)也装了,在网上查了好久也没找到解决的方法 [em10]
请教高手大大们这是怎么回事啊? [em6] |
|