PDA

View Full Version : How to fix this issue?



Gokulnathvc
13th February 2012, 06:55
1) undefined reference to `GUID_DEVINTERFACE_DISK'
2) undefined reference to `_imp__SetupDiGetClassDevsW@16'

FelixB
13th February 2012, 08:23
if you have undefined references, then you have to define these references. include the necessary files, set your compilers search paths etc.

Gokulnathvc
13th February 2012, 08:24
How to define these references in my cpp file.?

ChrisW67
13th February 2012, 09:57
This is a Qt-focussed forum, not a general Windows API programming forum.

Ntddstor.h declares GUID_DEVINTERFACE_DISK.
SetupDiGetClassDevs is in setupapi.dll

Gokulnathvc
14th February 2012, 09:19
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.