Questions tagged [lnk2019]

LNK2019 is a common MSVC linker error indicating that the linker was unable to find a required external symbol in any compilation unit. Check the SO post on common errors and their resolution.

LNK2019 is a common MSVC linker error indicating that the linker was unable to find a required external symbol in any compilation unit. A possible and common cause of the error is a symbol that is declared but never defined.

Before posting, check these posts

558 questions
0
votes
0 answers

Unresolved External Symbols LNK 2019

I keep getting an "lnk" error. Below is the .h file. template < class T, class KF > class HashTbl { public: HashTbl(int initTableSize); ~HashTbl(); void insert(const T &newDataItem) throw (bad_alloc); bool remove(KF searchKey); bool…
WarriorWSU
  • 11
  • 2
0
votes
1 answer

How to solve error LNK2019 by myself in Visual Studio series

During my study in dcmtk, I come across hundreds of error "LNK2019". Everytime I could only google it, searching for someone telling me which lib should I add. I wonder if I could find the lib I need by myself. My work IDE is Visual Studio 2015, and…
WtDMaO
  • 13
  • 2
0
votes
2 answers

Linkage error for one function only. Other functions with similar signature in same class and CPP file are working fine

The similar question for this type of linkage error has been asked before, and I have looked into most (if not all) of them. Some similar questions here, GitHub and MSDN that I looked into to solve this problem: Github: MSDN: StackOverflow…
StewieGGriffin
  • 349
  • 1
  • 4
  • 14
0
votes
1 answer

LNK2019 error while creating an object in another solution c++

I'm trying to create objects by using another c++ solution's files. When I create a MyClass1 object program gives error of: 1>main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall MyClass1::~MyClass1(void)"…
trante
  • 33,518
  • 47
  • 192
  • 272
0
votes
1 answer

Templates in main ( I know it shouldnt be there)

Well, basically for a class I need to make a simple program that used templates, in which I receive data from the user that I dont really know the type of, until I receive it. template int main() { Calculator calc; bool flag…
0
votes
1 answer

How to correctly use a void function with no input parameters in C++

I am quite new to C++. I need to make a small application which reads the content of a txt file and then displays the content in the console. I have three points forming a triangle that I will plot later on. I want to do all this operation in a…
0
votes
1 answer

LNK2019 error; unresolved external symbol | C++

This is a project I'm doing for school. I believe the program should work, but I have a linker error that I can't figure out. the error: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external…
K.J. Shamberger
  • 69
  • 1
  • 2
  • 8
0
votes
1 answer

VisualC++ Tensorflow C API Wrapper causes LNK2019

I am currently writing a VisualC++ 12 Tensorflow Wrapper to enable Inference Tasks for the Tensorflow Object Detection API. However, I get some linking errors of the Type LNK2019 ("unresolved external symbol"). I researched some usual causes for…
ITiger
  • 1,056
  • 3
  • 11
  • 24
0
votes
0 answers

Got LNK2019 Error in VS 2015 but not in VS2013

i am having a solution with multiple projects in C++. when I compile this solution in Visual Studio 2013 I get no errors when I try to compile the same solution file in visual studio 2015 I got the linker error LNK2019 error image…
0
votes
1 answer

Nuget - LNK2019 when using one of my project that links to a nuget package

Ok my problem is simple, but i can't figured it out. In a single solution I have a project (Application exe) that references another one (lib). This lib references a nuget package, for instance, CxImage. .targets
0
votes
0 answers

One of my member functions, which is a purely virtual void, has an LNK 2019 error

I am working on drawing shapes using strings with C++. So I wrote a class of Shapes that serves as a base class to 2 derived classes, which are Diamond and Square. My virtual void function setStars() basically stores the coordinates of the points of…
Yang
  • 21
  • 1
  • 7
0
votes
0 answers

VS error LNK2019, MySQL code invokes __declspec(dllimport) error

As I try to compile my code, I get this error: 1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string,class std::allocator > const & __cdecl sql::SQLException::getSQLState(void)const "…
Treak
  • 1
  • 1
0
votes
0 answers

How to use Qt libraries in UWP project?

I have a UWP project for which I wish to use some of the QtCore and QtNetwork classes. I have successfully included the headers, and I added the "lib" folder of Qt in the Additional Library Directories option of the Linker. When trying to build the…
0
votes
1 answer

Specify include-path and library-files for code generation in Simulink Coder

This drives my crazy: I have a simulink model with an s-function generated by the s-function builder. I use some external header and library files (lib/dll) and all works in simulink-normal-mode. But if I try to run my model in rapid accelerator or…
Lemonbonbon
  • 686
  • 5
  • 25
0
votes
1 answer

C++ link errors on solution with many projects

I created a C++ solution full of WIN32 console application projects in the following form: Each projects contains .cpp and .h files and in Forms there is only main.cpp which includes the include lines for all .h files. When trying to bulid even a…
yishai
  • 83
  • 1
  • 3
  • 15