原来
#include <setupapi.h>
#include <stdio.h>
#include <setupapi.h>
#include <stdio.h>
改成这样就可以了:
#include <windows.h>
#include <setupapi.h>
#include <stdio.h>
看来如果进行win32编译,前提是必须引进 windows.h 这个头文件。
具体错误如下:
e:\vc98\include\setupapi.h(37) : error C2143: syntax error : missing ';' before '*'
e:\vc98\include\setupapi.h(37) : error C2501: 'LPGUID' : missing storage-class or type specifiers
e:\vc98\include\commctrl.h(26) : error C2146: syntax error : missing ';' before identifier 'HRESULT'
e:\vc98\include\commctrl.h(26) : fatal error C1004: unexpected end of file found