PDA

View Full Version : Linking to Libraries (HIDAPI)



MarkBrooks
20th April 2016, 22:39
Hi,

I have moved a design from Qt4.7.0 to Qt5.5 MSVC2010 version. I am having trouble trying to get the HIDAPI linked in propperly.

In my .pro I use this
LIBS += "C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\\SetupAPI.lib"
SOURCES += windows/hid.cpp

But I get this:
Creating library release\SeaWolf.lib and object release\SeaWolf.exp
hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function _hid_enumerate
hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24 referenced in function _hid_enumerate
hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20 referenced in function _hid_enumerate
hid.obj : error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsA@16 referenced in function _hid_enumerate
release\SeaWolf.exe : fatal error LNK1120: 4 unresolved externals

Could someone help me work though getting the .lib linked?

BR
Mark

d_stranz
23rd April 2016, 19:04
Were your libraries built with MSVC210? Are you using the right dllimport macros? (Assuming the libraries are delivered as DLLs)