Skip to main content
Visitor II
October 14, 2025
Question

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

  • October 14, 2025
  • 3 replies
  • 385 views

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.

    3 replies

    Visitor II
    October 18, 2025

    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.

    Graduate II
    October 18, 2025

    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.

    Super User
    October 29, 2025

    @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 ... ?

    FarkasGAuthor
    Visitor II
    October 29, 2025

    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.