Setupapi.H relies on these header files
#include <Windows.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <strsafe.h>
#include <stdint.h>
#include <SetupAPI.h>
#include <INITGUID.H>
#include <WinIoCtl.h>
//#include <AtlBase.h>
#include <io.h>
#include "xdma_public.h"
#include "pcie_fun.h"
1. The error is reported as follows:
the loading sequence of the adjustment header file is as follows:
#include <SetupAPI.h>
#include <strsafe.h>
About to #include & lt; strsafe.h> Put #include & lt; SetupAPI.h> Just behind.
2. Then continue to report an error
because it is not linked to the setupapi.lib library
Library location: C:\program files (x86)\Microsoft SDKs\windows\v7.1a\lib\setupapi.lib
Solution: load the library into the project.
1. Create a new lib folder under the project path, copy the library to the Lib folder, and add it in the project * * *. Pro
LIBS += -L$$PWD/lib/ -lSetupAPI
2. A simpler way is to add directly
LIBS += -lSetupAPI
Read More:
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”
- How to Solve QT Error: The build directory needs to be at the same level as the source directory.
- How to Solev QT compilation error “cannot find – LGL”
- [Solved] Qt Error: qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
- [Solved] fatal error C1083: Could Not Open Unable to open include file:“stdint.h”: No such file or directory
- [Solved] QT error: the packaged exe of Enigma virtual box reports an error cannot load library qt5core.dll
- [Solved] SecureCRT error: keyboard-interactive authentication with the ssh2 server failed
- How to Solve Microsoft.CppCommon.targets(279,5): error MSB3073
- How to Solve Cocoapods Installation Failure
- Windows: How to Solve PCL C2065 Error
- How to Solve [error] malformed \uxxxx encoding Error
- How to Solve Starrocks Various Error
- How to Solve Error: “initializer element is not constant”
- ads: How to Solve designguide Cannot to Open Error
- Kotlin: How to Solve kapt import error
- How to Solve Svn upload so File Error
- VScode: How to Solve golong plug-in install Error
- How to Solve Loadrunner Error: Failed to find .cfg file
- [Solved] fatal error C1083: Cannot open included files: “stdafx.h”: No such file or directory
- How to Solve cocos2dx msb3073 Error