directInput8create () в моей среде msys2-mingw64 . Я проверил dinput.dll в каталоге bin/ ... но я также использовал каталог System32 , как показано в Makefile. Ошибка отображается ниже во время компиляции: < /p>
Код: Выделить всё
# makefile ( formatted for brevity )
DD = C:\Windows\System32\
DI = dinput
DI8 = dinput8
@g++ -g -c src/di-mouse.cpp -L$(DD) -l$(DI)
# source (C++)
#include
void di::mouse::test()
{
IDirectInput * _di = NULL;
HRESULT hr = DirectInput8Create( GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput, (void**) &_di, NULL );
}
# error log
msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: di-mouse.o: in function `di::mouse::test()':
msys64\src/di-mouse.cpp:12:(.text+0x3e): undefined reference to `DirectInput8Create'
msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: di-mouse.o:di-mouse.cpp:(.rdata$.refptr.IID_IDirectInputA[.refptr.IID_IDirectInputA]+0x0): undefined reference to `IID_IDirectInputA'
collect2.exe: error: ld returned 1 exit status
Подробнее здесь: https://stackoverflow.com/questions/796 ... put8create