1) undefined reference to `GUID_DEVINTERFACE_DISK'
2) undefined reference to `_imp__SetupDiGetClassDevsW@16'
1) undefined reference to `GUID_DEVINTERFACE_DISK'
2) undefined reference to `_imp__SetupDiGetClassDevsW@16'
if you have undefined references, then you have to define these references. include the necessary files, set your compilers search paths etc.
How to define these references in my cpp file.?
This is a Qt-focussed forum, not a general Windows API programming forum.
Ntddstor.h declares GUID_DEVINTERFACE_DISK.
SetupDiGetClassDevs is in setupapi.dll
I have linked the setupapi library in qmakespec. -lsetupapi and included initguid.h in my cpp file. Now the undefined reference issue has been solved.
Bookmarks