CppPilot

C++ / Documentation search

Find the error. Find the next step.

Search by diagnostic code, copied message, or symptom. Filter by content and project system.

10 results for “LNK2019”

Browse documentation →
  1. Error guidesMSBuild + CMake

    LNK2019: unresolved external symbol

    What LNK2019 unresolved external symbol means in Visual Studio, its common causes, and how to fix each of them.

  2. Examples and diagramsMSBuild + CMake

    LNK2019: main or WinMain is missing.

    An unresolved main referenced in invoke_main means that Linker > System > SubSystem does not match the entry point: Console expects main , Windows expects WinMain .

  3. Examples and diagramsMSBuild + CMake

    LNK2019: A template or an inline function is defined in a .cpp file.

    Move its definition to the header: it must be visible wherever it is used.

  4. Examples and diagramsMSBuild + CMake

    LNK2019: C code is called from C++ without extern "C" .

    Wrap the C declarations in extern "C" { } in the header, so that C++ looks for the undecorated name.

  5. Examples and diagramsMSBuild + CMake

    LNK2019: The .cpp file that defines it is not part of the project.

    Add the file to the project in Solution Explorer: a file on disk that is not in the project is never compiled.

  6. Examples and diagramsMSBuild + CMake

    LNK2019: The declaration and the definition do not match.

    Compare the signature: a missing const , a different parameter type, another namespace, or a member function defined without its Class:: prefix declares a different symbol.

  7. Examples and diagramsMSBuild + CMake

    LNK2019: The function is declared but never defined.

    Write its body, or remove the call. A declaration in a header is only a promise that a definition exists somewhere.

  8. Examples and diagramsMSBuild + CMake

    LNK2019: The library that defines it is not linked.

    Add the .lib to Linker > Input > Additional Dependencies and its folder to Linker > General > Additional Library Directories , for every configuration and platform. For a library built in the same solution, add a project reference instead.

  9. Examples and diagramsMSBuild + CMake

    LNK2019: The library was built for another platform.

    Link the x64 library in x64 builds and the x86 library in Win32 builds.

  10. Examples and diagramsMSBuild + CMake

    LNK1120: LNK2019 errors precede it.

    Each one names an unresolved symbol and the function that references it. See how to fix LNK2019 .