[ABANDONED] cannot find "-lc": Invalid argument

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

  • [ABANDONED] cannot find "-lc": Invalid argument

    How do I make the "-lc" linker option work?

    I added "-lc" (with the quotes and I tried without) to the "Additional Linker options" section of the Linker settings tab.
    Linker is set to GNU (not Segger)
    I also installed the additional C++ libs in the package manager (not sure if this was necessary or not..) IDE version 7.10a

    Reason I'm trying to set this is to bypass this error >> undefined reference to `__libc_init_array' to which I have never been able to find a satisfactory fix (unless I use another IDE which I won't mention)

    I did see in another thread a fix for undefined reference to `__libc_init_array' but the help/fix was too vague so i couldn't replicate fix..
  • Hello,

    Thank you for your inquiry.
    This does not sound like the right approach to tackle the issue you are seeing. Currently it sounds more like a project setup issue.
    The toolchain should provide all necessary libc symbols out of the box.

    Could you provide a small example project that shows the "undefined reference to `__libc_init_array'" error?

    On another note. Is there a specific reason you are using the gnu linker instead of the SEGGER linker?
    Is there some feature missing or did something not work?

    Best regards,
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.