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

MSVC15 Linking error LNK2019

Yes, I have read the documentation about the LNK2019 error, however I can't figure out what is actually causing the problem since the error message is quite random to me. The application is quite large, so can anyone perhaps conclude something out…
TVA van Hesteren
  • 1,031
  • 3
  • 20
  • 47
0
votes
2 answers

Linker Error LNK2019 traced back to an __stdcall I think I got the right lib - what can I do to resolve this?

I tried to port a LabCVI Project to MSVS 2010 C++ Express. There is a line of code which reads like this: if (InitCVIRTE == 0) return 0; A Linker Error occurs: LNK2019 "_InitCVIRTEEx@12" - all relevant header already feature the cpp…
Johannes
  • 6,490
  • 10
  • 59
  • 108
0
votes
0 answers

LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)

I've seen a ton of questions here (And in other sites) about this error and none of them seem to really have the answer to why this error happens in my particular case. I've already tried these: Checking what the project is being created…
0
votes
2 answers

error LNK 2019 Unresolved externals Build error during compilation in c++

I keep getting this error when I try to compile my project in visual studio 2015 and I have tried countless alternatives but none seems to work. What I have tried so far: Made sure I am running the correct visual studio project (console…
0
votes
0 answers

LNK2019: unresolved external symbol - No externals used

Learning C++ at the minute and am writing a program which solves a Sudoku puzzle. Just as I was ironing out some of the creases I went to run the program and the error LNK2019 has appeared. error LNK2019: unresolved external symbol _main referenced…
0
votes
1 answer

Resolving 'LNK2019 unresolved external symbol' on DirectDrawCreate

I've been attempting to get DirectDraw to function on a CE5.0 framework for the last week and I'm running into some very odd issues. ddrval = DirectDrawCreate(NULL, &lpDD, NULL); When I have this function in my code, I get "error LNK2019:…
Lunin
  • 370
  • 2
  • 9
0
votes
0 answers

error LNK2019 of a modified versione of XMLLite library

I modified XMLLite library in order to parse my XML file, then I modified it again in order to have a PPL version of XMLLite lib. My code works so I copied/pasted .cpp and .h file in a project on VS2013 (POSTServer Project) that need to use it. My…
kenhero
  • 95
  • 2
  • 11
0
votes
2 answers

LNK2019 on some class functions, but not on others (template class in dll)

Ok, without including the whole codebase... #ifdef KIT_EXPORTS #define KIT_API __declspec(dllexport) #define EXP_TEMPLATE #else #define KIT_API __declspec(dllimport) #define EXP_TEMPLATE extern #endif #ifndef…
NapkinTrout
  • 269
  • 1
  • 9
0
votes
1 answer

Error code LNK2019

I need help debugging this code for a class. I am not a computer science major, so I need explanation in very basic terms. The error code I'm getting is error LNK2019: unresolved external symbol "public: void __thiscall Student::showStudent(void)"…
A.O.
  • 1
  • 1
0
votes
0 answers

error LNK2019: unresolved external symbol _main referenced when using Dlib in Visual Studio 2015

I'm using Dlib 19.3 in Microsoft Visual Studio Community 2015. For compiling, I create Win32 Console Application, empty project. From Source Files, I add Existing Item file Source.cpp from dlib-19.3\dlib\all Right-click on project properties, at…
0
votes
2 answers

unresolved extern symbol error, only works when define function in the header

everyone, my first post here, if my style annoys your please let me know I am looking to learn how to post here. I hope someone could help me with this LNK2019 Error I got two source files, battleship.cpp and tester.cpp, the main() function is…
petergx
  • 45
  • 6
0
votes
0 answers

error LNK2019: unresolved external symbol "public: .. A::test()

In visual studio, one project has the Class A definition. in header file A.h: class A{ public: void test(); } in A.cpp file: void A::test() { } no error here. But another project when I try to use the test function of A in file B.cpp, there…
lightrek
  • 951
  • 3
  • 14
  • 30
0
votes
2 answers

CMake not linking .obj files properly LNK2019 __thiscall

Firstly, I've been working on this for days now and I've tried all possible fixes (went to 10th Google search page searching for a fix) but I can't get it to work. I'm porting Unix app (G++/Bison/Flex) to Windows (MSVC/WinBison/WinFlex). I'm using…
Đorđe Relić
  • 418
  • 4
  • 13
0
votes
0 answers

Error LNK2019 with creating DirectX11

Hi I'm currently trying to set up Direct X project in visual studio 2015. i have downloaded the correct SDK and linked the project to the correct directories, from what i have been taught at uni. (this entire project was just meant to be a simple…
Dog-Face
  • 9
  • 1
0
votes
0 answers

LNK 2019 simple constructor

Im new in c++.I cant figure out what i am doing wrong for hours.Any help would be important.The problem is when calling the constructor in main: error LNK2019: unresolved external symbol "public: __thiscall imaging::Image::Image(void)"…
C.Iza
  • 1
  • 1