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
2
votes
1 answer

Visual Studio 2012: Unresolved external symbol _BluetoothFindFirstRadio

I'm trying to use some Bluetooth functions (http://msdn.microsoft.com/en-us/library/windows/desktop/aa362927(v=vs.85).aspx) in a Win32 Console Application project. After including the relevant headers, I get linker errors like the following during…
Felix Fung
  • 1,711
  • 19
  • 27
2
votes
3 answers

LNK1120: 1 unresolved externals and LNK2019: unresolved external symbol

I've been getting these two errors and I cant seem to find a solution that works. LNK1120: 1 unresolved externals Error 1 error LNK2019: unresolved external symbol "public: __thiscall Vector3D::Vector3D(class Vector3D const &)"…
Daniel Mayles
  • 25
  • 1
  • 1
  • 3
2
votes
3 answers

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

I keep receiving the following two errors and I can't figure out why. error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib(crtexe.obj) error LNK1120: 1 unresolved externals Ensuring that I run it as…
2
votes
1 answer

Unresolved external symbol error linking DLL to LIB

I have a LNK2019 in my c++ solution (VS2012). I have the following: A static .lib with a class Matrix {...} inside A dll which will consume this .lib. I have setup a project reference in the gui, and I can see the .lib being listed on the 'Command…
Simon P
  • 1,196
  • 1
  • 12
  • 26
2
votes
1 answer

Can't open socket. c++

I'm trying to open socket. But it gives a link Error (LNK2019 : unresolved external symbol 'symbol' referenced in function 'function') at WSASTartup, WSAGetLastError, socket, htons. What I'm doing wrong? Here is a source code #include…
Endiny
  • 23
  • 3
2
votes
1 answer

error LNK2019: unresolved external symbol "public: void __thiscall

My assignment is to write code to keep track of a sorted linked list using recursion. We were given the make up of the classes and files, but needed to fill out the functions. I'm getting four errors that I believe to be caused by calling the…
Ross Morrow
  • 41
  • 1
  • 1
  • 2
2
votes
1 answer

error LNK2019: unresolved external symbol - only .h files

Argh... I've been struggling lately to make Visual Studio 2010 (VC++) include a bunch of 3rd party libraries I wanna use in my project. That's the issue: The linker seems not to be able to determine every symbol that is generated in my code which…
2
votes
1 answer

"unresolved external symbol _triangulate" when using triangle library

I'm currently using the triangle library in my program. The library contains only .c and .h files (no .lib). I get the following error on Visual Studio C++ 2010: 1>data.obj : error LNK2019: unresolved external symbol _triangulate referenced in…
arnaud13
  • 109
  • 1
  • 2
  • 11
2
votes
2 answers

LNK2019: unresolved external symbol but I have coded the function

Can somebody help me with this? I'm using Visual Studio 2010 I'm getting this message and I don't know how to solve this. 1> Generating Code... 1>dct.obj : error LNK2019: unresolved external symbol "public: __thiscall Amostras::Amostras(class…
Éder John
  • 21
  • 2
2
votes
1 answer

Cannot include a static library in the project

I am developing a subproject in a solution in MS Visual Studio 2005. The subproject is a Windows CE 6.0 service (as DLL) and it is included in the Windows CE 6.0 OS Project. In the subproject I need to use some functions from "ceosutil.lib"…
Mariusz
  • 143
  • 1
  • 13
1
vote
1 answer

Yet another LNK2019: unresolved external symbol

I'm creating a backbone for a school project, but I'm running into "unresolved external symbol" errors. According to previous problems mentioned on this site, I think have to manually link my project to a .lib file. Problem is, I don't know exactly…
derp
  • 411
  • 2
  • 5
  • 12
1
vote
1 answer

link error lnk2019

so im getting this error Error 1 error LNK2019: unresolved external symbol "public: enum LL_ERR __thiscall linkedList::addData(int)" (?addData@?$linkedList@H@@QAE?AW4LL_ERR@@H@Z) referenced in function "public: enum S_ERROR __thiscall…
lesyriad
  • 19
  • 1
1
vote
3 answers

visual studio solution with multiple projects doesnt compile

I first made a program in eclipse (mingw compiler). Now i am translating the code to Visual Studio 2008. It is one solution with multiple projects. 2 of the projects are for running a (console) program. The other 2 projects are helper classes for…
1
vote
1 answer

Errors LNK2019 and LNK2028 in VC++ Express 2008

I'm trying to build a solution with 2 projects and get these error messages: ColliderTest.obj : error LNK2028: undefined token (0A000080) "public: __thiscall Rect::Rect(int)" (??0Rect@@$$FQAE@XZ) referenced in function "void __cdecl…
Granjero
  • 340
  • 3
  • 13
1
vote
2 answers

When using fstream in a library I get linker errors in the executable

When I add #include and try to use std::ifstream (i.e. std::ifstream ifile(pDest)) in my library I get the following linker errors when compiling a project whih uses the library: Error 2 error LNK2019: unresolved external symbol…
meds
  • 21,699
  • 37
  • 163
  • 314