Questions tagged [lnk2001]

LNK2001 is a common Visual Studio linker error condition indicating that the linker is unable to locate or find the symbol being referenced. Check the SO post on common errors and their resolution.

LNK2001 is a common Visual Studio linker error condition indicating that the linker is unable to locate or find the symbol being referenced.

Related errors include .

Before posting, check this post to see if it answers your question.

179 questions
1
vote
1 answer

LNK2001 linker error while linking google benchmark lib

I have a problem with linking benchmark.lib in my project. I've built it as described here. I've got sln file, compiled it (in release mode) and then created my own VS project. Linker can find my lib but it doesn't link it anyway (LNK2001). I added…
FlyIntFish
  • 31
  • 3
1
vote
0 answers

Build fails sample Qt5 Unresolved symbol QtConcurrent QunhandledExecption

trying this sample code qt-concurrent, I am getting LNK2001 unresolved symbol QFutureInterfaceBase on link for x64 arch using MSVC 2019 LNK2001 symbole externe non résolu "__declspec(dllimport) public: void __cdecl…
1
vote
1 answer

How to pass variables to function exported by a DLL, I get error LNK2001

I have to pass a HWND variable from the main program to a function exported by a DLL. Variable is called mainHwnd and DLL is defined in this way: mydll.h #ifdef MYDLL_EXPORTS #define MYDLL_API extern "C" __declspec(dllexport) #else #define MYDLL_API…
gc5
  • 9,468
  • 24
  • 90
  • 151
1
vote
2 answers

DirectX 12 SDK LNK2001

I keep getting this link error: error LNK2001: unresolved external symbol D3D12SerializeRootSignature even though i have the SDK linked and added to C/C++ and VC++
user10161312
1
vote
2 answers

LNK2019 / 2001: unresolved external symbol

I've seen similar questions online that are problems with people forgetting to include certain things, etc. However I'm getting this error after checking out our code from subversion--others have done the same without getting this problem. My…
Micky
  • 345
  • 1
  • 4
  • 13
1
vote
0 answers

LNK2001 error on atoi and stoi function with proper includes added

I have this project that throws LNK2001 error on using atoi while proper includes added: #... //other headers #include #include #include #include #include #include BOOL main(int argc, char*…
0_o
  • 570
  • 6
  • 18
1
vote
0 answers

LNK2001: Caffe2 Inference

I'm trying to build a simple program to make inferences with Caffe2 Library on C++. I took some examples from the web and the code looks like this: #include #include "caffe2/caffe2.hpp" #include…
ariangc
  • 11
  • 3
1
vote
0 answers

Use of static const variable yields to undefined symbol (LNK2001) on Visual Studio 2015

I'm trying to create a really simple DLL using Visual Studio 2015 and CMake. To avoid possible DLL symbol export complications, CMake has the export of symbols enabled for Windows: set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS on) My DLL contains a single…
1
vote
1 answer

__iob_func referenced in function _gsl_error when using GSL library

Using GSL library 2.4 on Visual Studio 2017 and getting these errors on compile and run, Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol ___iob_func referenced in function…
1
vote
0 answers

Python 2.7 MySQL-python Link Error

I know that this has been asked a few times on here, but I have tried every solution given on each question this was asked. I've been trying to solve this for about 5 hours now, I even went to the extent of reinstalling windows to hope it magically…
1
vote
1 answer

LNK 2001 error with struct

I have a h- and a cpp-file with some calculations used in many of my projects. Now I tried to put them in a separate dll, so the files should not be included in every project. When linking I get a LNK2001 (unresolved symbol) error for a struct,…
Simon
  • 1,616
  • 2
  • 17
  • 39
1
vote
1 answer

error LNK2001: unresolved external symbol __imp__sprintf

I'm trying to compile FTDI demo application in VS2015. Since the application originally was built in VS2013 and there some changes related to the new version of VS I have several linking errors. These are errors that I get: …
Dmitry Kezin
  • 105
  • 1
  • 3
  • 10
1
vote
0 answers

Linker errors trying to use shapelib

I am trying to include shapelib in an existing solution in MSVS 2010. However, I'm getting the following errors for each function call from shapelib: error LNK2001: unresolved external symbol "extern "C" void __clrcall SHPDestroyObject(struct…
rosco
  • 11
  • 2
1
vote
1 answer

Unresolved External symbol "class"

Error LNK2001 unresolved external symbol "class Object objects" When the class is declared as an extern, it will create this linker error for every piece of code connected to it. But when I create a private version of the class in other files, they…
Kryton
  • 11
  • 1
  • 4
1
vote
0 answers

error LNK2001: unresolved external symbol MKL_CBWR_Set

In a C++ project... Project is linked to a lib which is integrating MKL. In the source code, I have this line gaussNewton<5, 16>::myfunREE_33_GN_rsp_new(&inv_Controls, &interOut, table_ENP3_local, coefForJacobian, interOut.vo); when…
kiriloff
  • 25,609
  • 37
  • 148
  • 229
1 2
3
11 12