Skip to main content
Associate
Oct 14, 2025 9:47 PM UTC
Question

STVD linker error symbol not defined, how to locate the c source line?

If an symbol not defined, the compiler does not give any error, only the linker.
Unfortunately it cannot say in which c source line is the undefined symbol, only the obj. file name.
The only way is to select/copy and search for the text, which is many steps, and then may give a lot of results if the symbol name appears in comments too.

Other compilers (Microchip, Visual Studio...) goes to the source error line on doubleclick.
Any idea how to go fast to the source line?

    This topic has been closed for replies.

    4 replies

    AA1
    Senior III
    Oct 18, 2025 2:43 PM UTC

    The error "unresolved external" is always a linker error. You don't need the source line, Open the source file and search for the symbol. I don't believe it gives a lot of results. You should search only for whole words.

    Tesla DeLorean
    Guru
    Oct 18, 2025 6:53 PM UTC

    Check the compilation settings, if the compiler is outputting enough debug or line numbering data to achieve this back-referencing.

    You can also use grep or find-in-files to find the usage.

    Typically the error is a result of you not having source for the function in your code base and attendant libraries, or that you misspelled the name in your usage of it.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Andrew Neil
    Super User
    Oct 29, 2025 11:55 AM UTC

    @FarkasG wrote:

    The only way is to select/copy and search for the text, which is many steps, and then may give a lot of results if the symbol name appears in comments too.


    As @AA1 said, be sure to set your search for "whole words only". Also make it case-sensitive.

    If the name appears widely in comments, maybe that's a hint to choose a better name ... ?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    FarkasGAuthor
    Associate
    Oct 29, 2025 3:24 PM UTC

    Your solution is the original problem. It looks like the correct answer is "No solution".
    It will be good if the error window showing up with all occurences in the sources, then an double click goes to them.