1

I'm using qt5.5 in linux and win7 (mingw32) ... in linux it works (i had to build new usblibs for compatibility reasons)

in windows using this library /usr/local/.../code-qt/libusb-1.0.19-rc1-win/MinGW32/static/ i get the following errors and a few more, all with some

"_imp__SetupDixxxxxxx" being undefined

since the libusb build in windows seems quite more complicated, i was unable to figure out how to do it

at this point i have no clue what is wrong and any help is highly appreciated

i have no problems rebuilding the lib with ming32w inside or outside of qt5 creator or any other way, but i would need to have a few steps described on how to proceed.

cheers EinHexenMeister

E:\code-qt\qtHidTest\HidTest\windows\hid.c:289: error: undefined reference to `_imp__SetupDiGetClassDevsA@16'

E:\code-qt\qtHidTest\HidTest\windows\hid.c:298: error: undefined reference to `_imp__SetupDiEnumDeviceInterfaces@20'

E:\code-qt\qtHidTest\HidTest\windows\hid.c:491: error: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'

E:\code-qt\qtHidTest\HidTest\windows\hid.c:313: error: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'

E:\code-qt\qtHidTest\HidTest\windows\hid.c:347: error: undefined reference to `_imp__SetupDiEnumDeviceInfo@12'

demonplus
  • 5,613
  • 12
  • 49
  • 68
  • 1
    is your lib path correct? It seems you need the `Setupapi.dll` https://msdn.microsoft.com/en-us/library/windows/hardware/ff551015(v=vs.85).aspx – P.R. Jul 22 '15 at 06:20

1 Answers1

4

You need to link additional libraries for windows, add in your .pro file:

win32 {

LIBS += -lhid -lsetupapi

}
demonplus
  • 5,613
  • 12
  • 49
  • 68