How do I get more information about this linker error?

k b 0 Reputation points
2025-11-15T06:23:57.23+00:00

Recently I have been doing a lot of template related programming and every once in a while I get this linker error, but it doesn't really tell me much about what's wrong.

1>CollisionSystem.obj : error LNK2019: unresolved external symbol "??@e8eaa132e5066a93cc31d9aefe186beb@" (??@e8eaa132e5066a93cc31d9aefe186beb@) referenced in function "??@bd54e0b7a110bf1eef09ab35ef286110@" (??@bd54e0b7a110bf1eef09ab35ef286110@)

Am I missing something? Shouldn't it say the name of the function that's missing?

Thanks!

Developer technologies | C++
Developer technologies | C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Gade Harika (INFOSYS LIMITED) 1,945 Reputation points Microsoft External Staff
    2025-11-17T08:52:46.3833333+00:00

    Thanks for reaching out.

    MSVC prints decorated (mangled) symbols, and with linker optimizations like identical COMDAT folding (ICF) the reported name can be internal or folded and not resemble your source function. This happens a lot with templates, where multiple instantiations can compile to identical code. Temporarily build with /OPT:NOICF (and if needed /OPT:NOREF) to get clearer symbols while you diagnose. Use undname.exe to demangle, and enable /VERBOSE or /MAP for more link diagnostics. The fix is usually to make the template definition visible in the TU that uses it (move definitions into the header or explicitly instantiate required types), and ensure the object/library with the definition is actually linked. References: Microsoft docs on LNK2019 and decorated names; linker /OPT optimizations; Raymond Chen’s write‑up on ICF and why debuggers show confusing functions.

    Let me know if the issue persists after following these steps. I’ll be happy to assist further if needed.

    If the issue has been resolved, Kindly mark the provided solution as "Accept Answer", so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.