Stealthy linker errors

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Stealthy linker errors

      One of the things that I've noticed is linker errors tend to be pretty stealthy.

      In this case I accidentally added the declaration of a variable in an include file that was included in 10 files.

      I reproduced the issue with adding the following to that header.

      Source Code

      1. uint8_t blah;
      This is the output. You have to turn on "Show build info" and "Echo command lines" to get that amount.

      Otherwise, you get the following

      And honestly takes a minute to remember how to try to find the error.

    • New

      awneil, take a step back and look at the bigger picture.

      The linker is properly creating the CORRECT errors. Yes, the linker has it correct. The problem is SES is not displaying the error in a easy to see manor. I have no idea why you are over reaction to an obvious error in my code. The original cause for my hunt was a missing typedef. And this the linker assumed I was trying to create an overlapping variable in multiple object files. Again, the link did the correct thing.

      Have a tool simply say "build failed" is not helpful. I am simply asking Segger to improve the way they display linker errors in the standard build window.