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
1
vote
1 answer

Why is this template example code not compiling?

I am trying to make an example of using templates in order to learn how to use them. I have made a project in Visual Studio 2010 C++ with three files: Controller.cpp: #include #include "Foo.h" using namespace std; int main(){ …
user2726232
  • 131
  • 11
1
vote
1 answer

Unresolved external symbol "public:

This is declaration file MyImage.h: #pragma once template class MyImage { public: MyImage(); MyImage(unsigned int w, unsigned int h); MyImage(const MyImage& copie); ~MyImage(); MyImage&…
Dutchman
  • 41
  • 6
1
vote
0 answers

making a template priority queue with vectors

The following is a program to implement a priority queue. I am using vectors to create the queue. For this program, I want to be able to add any type of data using a template. All of the code compiles correctly until I try to test the code by…
1
vote
2 answers

c++ error LNK2019: unresolved external symbol .obj

First of all, I know there are over a hundred similar posts out there with the same error, and the entire reason for that is because the error given is as useless as can be.. I've searched through over 20 solutions already through Google and I still…
Kevin Cruijssen
  • 9,153
  • 9
  • 61
  • 135
1
vote
1 answer

C++ Dynamic array of objects, error LNK2019 referenced in function

I am trying to write a library system program in c++. In the program there are book, student and library system classes. Library system class will have dynamic book and student array so that for instance ı can add book or student to the system. In…
1
vote
1 answer

error LNK2019 unresolved external symbol - Class Library issue?

I have one solution with 2 projects in it. (VS2013) One project is a Direct3D with XAML project, the other is a Static class library. I have set up project dependencies. I am wondering if the unresolved external symbols could be anything to do with…
Jimmyt1988
  • 20,466
  • 41
  • 133
  • 233
1
vote
0 answers

Link error 2019: CString Argument Passing between MFC and ATL

I have two projects: Project1: An ATL COM based project whose output is a .lib file (a static library) Project2: An MFC based GUI Application which links to the static library so that the functions in that can be used.\ Whereever required, the .h…
Bhagirath N Sai
  • 199
  • 4
  • 16
1
vote
1 answer

error LNK2019: unresolved external symbol for class unordered_map

My code works on my school computer when using Visual Studio, but as soon as I tried on my computer with Visual Studio 2012 too, it compiles but gives me this error when I build my project : Main.obj : error LNK2019: unresolved external symbol…
nichus
  • 13
  • 1
  • 4
1
vote
2 answers

Visual Studio C++ 2010 in-project link error

I have a multi-file project in VSC++2010, but for some reason it won't link some of them properly. For example, I have CParser.h and CParser.cpp . CParser.h is just some function declarations: #pragma once #include void parseArg(int argc,…
StelarCF
  • 48
  • 6
1
vote
0 answers

Error LNK2019: Unresolved external symbol with DirectX

I have been trying all day to setup a direct x window and I know it not my code that is messing up it is my compiler but i don't know how to fix this. 1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl ReleaseObjects(void)"…
1
vote
2 answers

unresolved external symbol main (no underscore)

I'm trying to compile a C program (specifically, the Python interpreter) as a plain statically linked 64-bit Windows binary. My command line looks like this: cl /DPy_BUILD_CORE ... /link Advapi32.lib Shell32.lib User32.lib where ... is the long…
rwallace
  • 31,405
  • 40
  • 123
  • 242
1
vote
2 answers

C++ Inheritance With No Default Constructors

So I was trying to implement a chess game. I've got the most common link error: error LNK2019: unresolved external symbol "public: __thiscall Bishop::~Bishop(void)" (??1Bishop@@QAE@XZ) referenced in function _main So here are the two related…
John John
  • 44
  • 7
1
vote
1 answer

Error 1 error LNK2019: unresolved external symbol "public: void __thiscall Login::loginMenu(void)

I searched through the website and there were answers about default constructor or using #pragma. but I'm using #pragma in my visual studio and I tried to debug but any of those methods didnt work. Please tell where I have made the mistake. Thank…
user3161521
1
vote
1 answer

Linking error with luarocks

Im trying to use luarocks for installing luafilesystem module. Since im trying to install version 1.6.2, luarocksis trying to build luafilesystem on my local machine. I have the following error: lfs.obj : error LNK2019: unresolved external symbol. I…
Andrey
  • 21
  • 2
1
vote
1 answer

C++ LNK2019 errors everytime after I add object of class

I'm working on own double linked list and everytime after adding object of class DoubleList in Evidence.cpp I get a LNK2019 error: Unresolved external symbol. I will be glad for every advice. Here are my codes: StudentRecord.h #pragma once #include…
Pivoman
  • 4,435
  • 5
  • 18
  • 30