[Borland C++] DirectInput: unresolved externals
-
Hallo!
Ich habe versucht, dieses Tutorial umzusetzen. Das Compilieren geht problemlos, nur beim Starten kommen dann die beiden Fehler:[Linker Fehler] Unresolved external '_IID_IDirectInput8A' referenced from ...
[Linker Fehler] Unresolved external '_c_dfDIKeyboard' referenced from ...Header und Libs sind wie im Tutorial eingebunden:
// include the basic windows header files and the DirectX header files #include <windows.h> #include <windowsx.h> #include <dinput.h> // include the DirectX Library files #pragma comment (lib, "dinput.lib") #pragma comment (lib, "dinput8.lib") #pragma comment (lib, "dxguid.lib") //... // this is the function that initializes DirectInput void initDInput(HINSTANCE hInstance, HWND hWnd) { // create the DirectInput interface DirectInput8Create(hInstance, // the handle to the application DIRECTINPUT_VERSION, // the compatible version IID_IDirectInput8, // the DirectInput interface version (void**)&din, // the pointer to the interface NULL); // COM stuff, so we'll set it to NULL // create the keyboard device din->CreateDevice(GUID_SysKeyboard, // the default keyboard ID being used &dinkeyboard, // the pointer to the device interface NULL); // COM stuff, so we'll set it to NULL dinkeyboard->SetDataFormat(&c_dfDIKeyboard); // set the data format to keyboard format // set the control you will have over the keyboard dinkeyboard->SetCooperativeLevel(hWnd, DISCL_NONEXCLUSIVE | DISCL_BACKGROUND); }
und in den Projektoptionen sind die Pfade auch gesetzt:
Include-Pfad: *DX SDK*\Include\ $(BCB)\include $(BCB)\include\vcl Bibliothekspfad: $(BCB)\Lib\DirectX //mit Coff2Omf umgewandelte DX Libs $(BCB)\Projects\Lib $(BCB)\lib\obj $(BCB)\lib
Warum erkennt der die beiden Ausdrücke nicht?