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

c++ LINK2019 i am a rookie,i was trapped .please help me

i think my problem is from class Car;but i can not found it ,please help me. #include void main() { int n = rand() % 6; int time = 1; for (int i = 0; i < n; i++) { Car car1; // this place is error //…
1
vote
1 answer

Undefined symbol in static library, but exists when in same VS solution

I have a weird linker error that I can't seem to straighten out. This project is actually a Windows port of our system on Linux, so we know everything is working before the port to Windows. I'm compiling FTGL (OpenGL font lib) as a static library…
walshy002000
  • 99
  • 1
  • 10
1
vote
1 answer

SDL error LNK1120 & LNK2019

I'm trying to compile a simple SDL example from a book and I'm getting these errors. I'm near positive everything is linked correctly, because I was able to get other SDL examples to compile fine. I'm using Visual Studio 2013. This code was intended…
aredscout
  • 33
  • 1
  • 9
1
vote
1 answer

Unresolved external symbol when I add glfw3.lib to compiler argument

I have written a little batch file to compile a project from emacs and when I added a glfw3.lib to compiler argument I started to get this error: LNK2019: unresolved external symbol glfwInit referenced in function WinMain. So I created a project…
user3696459
  • 139
  • 5
1
vote
0 answers

error LNK2019 caused by an extern "C" function referencing another?

I'm writing a DLL to replace a much older one. The new version adds a new function, foo() that is more useful than bar() in the older DLL and effectively replaces it. However, I still need to have a usable bar() for legacy support. What I want are…
Sarkreth
  • 290
  • 2
  • 10
1
vote
3 answers

MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

The following is a sample from my textbook attempting to create a sequential access file. However I continue to receive this error when I try to compilein VS2008: MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced…
Chris Dillon
  • 31
  • 1
  • 5
1
vote
1 answer

Why my output operator<<() function definition results in unresolved external symbol error?

I don't know what's wrong with it.. I can't find where the error is.. The error is: error LNK2019: unresolved external symbol "class std::basic_ostream > & __cdecl operator<<(class std::basic_ostream \> &,class Table const &)"…
Jessica Jin
  • 195
  • 1
  • 7
1
vote
1 answer

Linking Error between matlab R2013a and MS VC++ 2013

I am writing a BCI game application in VC++ and require to implement Common Spatial Pattern Filtering (CSP) for feature extraction. Due to the hefty coding involved, I prefer to use an existing CSP Matlab function that I have. I followed the steps…
Adee_lib
  • 39
  • 1
  • 8
1
vote
1 answer

MSVC 2008 - Unresolved External errors with LIB but only with DLL, not with EXE project

I have a DLL that I am trying to link with a libjpeg LIB using MSVC 2008 that is generating Unresolved External Symbol errors for the libjpeg functions. I also have a test project that links with the exact same libjpeg library file and links…
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227
1
vote
2 answers

lnk2019 error in very simple c++ program

I have tried removing various parts and building, but nothing makes the lnk2019 error go away, or even produces any normal errors. Everything is in the one file at the moment (it won't be later when it is finished). The program has three lists of…
Erin
  • 49
  • 1
  • 5
1
vote
2 answers

LNK2019 on constructor with QGraphicsView subclass

I may be missing something obvious, but I can't get rid of a linking error in my Qt user interface. I've isolated the part that's causing trouble. Basically, I'm implementing a subclass of QGraphicsView to display an interactive overhead map. For…
Alexis Leclerc
  • 1,303
  • 1
  • 16
  • 26
1
vote
0 answers

"LNK2019: Unresolved External Symbol" error with glew/glut

I am not the best yet at OOP practices and that is what is contributing to this bug but I am really needing your help on this. I have a handful of files in here but I will try and post only the relevant pieces. PLY.cpp: #include…
1
vote
1 answer

Linking obj file in Qt

I need to use triangulation library, developed by Jonathan Shewchuk, in my c++ project. Problem is that C file must be compiled into object file which I have done using provided make file and visual studio compiler. This generates triangle.exe and…
M_global
  • 207
  • 4
  • 15
1
vote
1 answer

Cannot build NVAPI CustomTiming.cpp sample: 7x error LNK2019: unresolved external symbol

I'm trying to compile the CustomTiming.cpp sample from the NVAPI SDK and I'm getting the following errors: 1>------ Build started: Project: CustomTiming, Configuration: Debug Win32 ------ 1> CustomTiming.cpp 1>CustomTiming.obj : error LNK2019:…
BEIC
  • 67
  • 7
1
vote
0 answers

Unable to link external lib (CLAPACK) using MATLAB mex

I'm new to mex and this problem spent me days but I still cannot figure out what to do. I create la_test.cpp file to test one of the subroutines in CLAPCK: cgemm_ (complex matrix-matrix multiplication). Here is the code: #include "mex.h" #include…