Link error: linker tools error LNK2019
The error prompt error LNK2019: unresolved external "XX"
often appears during the compilation of C + + projects. The main reason is that the definition of the corresponding reference variable or function cannot be found in the currently referenced library during the linking process. At this time, you need to add the library that defines the reference variable to the corresponding project.
There are two main ways to solve this problem:
To manually add the powrprof.lib </KBD> library, do the following:
Method 1: use #pragma comment
, such as
#pragma comment (LIB, "powrprof. Lib")
method 2: properties under the corresponding item in vs: enter the corresponding position
Properties > Configuration Properties > Linker > Input > Additional dependencies add the powrprof.lib
library, as shown in the following figure:
Read More:
- Mac Docker pull Error: Error response from daemon: Get https://xx.xx.xx.xx/v2/: Service Unavailable
- [Solved] Visual studio 2022 error LNK2019: unable to resolve external symbol for
- error LNK2019: Unresolvable external symbols “__declspec(dllimport) public: int __thiscall QString::toWCharArray(wchar_t
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- bazel Compile Error: absl/base/policy_checks.h:79:2: error: #error “C++ versions less than C++14 are not supported.”
- [Solved] C++ Compile Error: prerequisites are different [How to Solve]
- [Solved] unesolved external symbol _imp_fprintf referenced in funciton _showerror
- C++ clang Compile Error: error: expected unqualified-id
- C++ Compile Error: error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]
- [Solved] Software Compile Error: xdo.c:29:34: fatal error: X11/extensions/XTest.h:
- How to Solve Kotlin unresolved reference error
- [Solved] C + + compile Error: error: default argument given for parameter 3
- [Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
- Solve error LNK2001 about pcl::io::vtkPolyDataToPointCloud
- Error lnk2038: detected “_ ITERATOR_ DEBUG_ Mismatched ‘level’ value of ‘0’
- [Solved] error LNK2005: _bn_sub_part_words Already defined in bn_mul.obj
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”
- LINK : fatal error LNK1104: Cannot Open the File “mfc90ud.lib”
- JanusGraph Error: Unknown external index backend [How to Solve]