要对usb做操控…include setupapi.h进来后…出现了一些错误
source:
-----------------------------------------------------------------------------------
// get setup API functions (only available in Win98 and Win2K)
#include <windows.h>
#include <setupapi.h>
#pragma comment (lib, "setupapi.lib")
------------------------------------------------------------------------------------
error message:
------------------------------------------------------------------------------------
G:/QT_Project/HOY_AP/UsbIF.cpp:39: undefined reference to `_imp__SetupDiGetClassDevsW@16'
G:/QT_Project/HOY_AP/UsbIF.cpp:66: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'
G:/QT_Project/HOY_AP/UsbIF.cpp:88: undefined reference to `_imp__SetupDiGetClassDevsW@16'
G:/QT_Project/HOY_AP/UsbIF.cpp:99: undefined reference to `_imp__SetupDiEnumDeviceInterfaces@20'
G:/QT_Project/HOY_AP/UsbIF.cpp:113: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailW@24'
G:/QT_Project/HOY_AP/UsbIF.cpp:122: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailW@24'
G:/QT_Project/HOY_AP/UsbIF.cpp:132: undefined reference to `_imp__SetupDiGetDeviceRegistryPropertyW@28'
G:/QT_Project/HOY_AP/UsbIF.cpp:134: undefined reference to `_imp__SetupDiGetDeviceRegistryPropertyW@28'
G:/QT_Project/HOY_AP/UsbIF.cpp:186: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'
:-1: error: collect2: ld returned 1 exit status
-------------------------------------------------------------------------------------
请问要如何解?感谢~