1

My company wants me to use Qt Creator, which seems to have trouble with system functions on windows.

I need to use the functions Uuidfromstring and SetupDiGetClassDevsW declared in <SetupApi.h>.

QtCreator autocompletes these functions with the corresponding parameters, the compiler throw an error if I don't put in the good parameters proving that it knows these functions exists.

But when I compile, I get this errors :

error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsW@16
error LNK2019: unresolved external symbol __imp__UuidFromStringW@8

Is it a .dll a problem ? It would be easily solved if I switched to Visual Studio but my company insisted on using this IDE.

EDIT : This is not a duplicate waiting for the bible of linker problems, this is more of a Qt Creator problem to correctly include the System libraries in a .pro file.

Here is how it is currently linked :

INCLUDEPATH += "C:/PROGRA~2/Windows Kits/10/Include/10.0.15063.0/um"
INCLUDEPATH += "C:/PROGRA~2/Windows Kits/10/Include/10.0.15063.0/shared"
INCLUDEPATH += "C:/Windows/System32"

LIBS += -L"C:/PROGRA~2/Windows Kits/10/Lib/10.0.15063.0/um/x64" -lwinusb -lsetupapi
sh5164
  • 276
  • 2
  • 15

0 Answers0