这是什么原因?小弟编译不过啊
Creating library Debug/v.lib and object Debug/v.exp
GameView.obj : error LNK2001: unresolved external symbol _GUID_SysKeyboard
GameView.obj : error LNK2001: unresolved external symbol _DirectInput8Create@20
GameView.obj : error LNK2001: unresolved external symbol _IID_IDirectInput8A
dinput.lib(dilib2.obj) : error LNK2001: unresolved external symbol _GUID_Key
//1.Creating the DirectInput Object
HRESULT hr=DirectInput8Create(AfxGetInstanceHandle(),DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&m_pDInput,NULL);
if(FAILED(hr))
{
Trace("Create DInput fail!");
ASSERT(false);
return false;
}
else
{
Trace("Create DInput succeed!");
}
//2.Creating the DirectInput Keyboard Device
hr=m_pDInput->CreateDevice(GUID_SysKeyboard,&m_pKeyboard,NULL);
if(FAILED(hr))
{
Trace("Create keyboard device fail!");
ReleaseDInput();
ASSERT(false);
return false;
}
else
{
Trace("Create keyboard device succeed!");
}
//3.Setting the Keyboard Data Format
m_pKeyboard->SetDataFormat(&c_dfDIKeyboard);
//4.get the top hwnd
HWND hParent = ::GetParent(m_hWnd);
HWND hWndTop = hParent;
while(IsWindow(hParent))
{
hWndTop = hParent;
hParent = ::GetParent(hParent);
}
//5.Setting the Keyboard Behavior
hr = m_pKeyboard->SetCooperativeLevel(hWndTop,DISCL_FOREGROUND | DISCL_NONEXCLUSIVE );
if(FAILED(hr))
{
Trace("Setting the Keyboard Behavior fail!");
ReleaseDInput();
ASSERT(false);
return false;
}
//6.Gaining Access to the Keyboard
m_pKeyboard->Acquire();