Skip to main content
LeventF16
Associate II
September 21, 2024
Question

Unable to switch to g++ linker.

  • September 21, 2024
  • 1 reply
  • 895 views

Hello.

We need to use g++ linker in our project.

But after setting g++ linker in Project->Properties->C/C++Build->Settings->MCU G++ Linker to g++ again ld.exe is invoked.

Would you please advice.

Thank you.

    1 reply

    Pavel A.
    Super User
    September 21, 2024

    In Project explorer, right click on the project. Select Convert to C++.

     

    LeventF16
    LeventF16Author
    Associate II
    September 22, 2024

    It is already in C++.

    Pavel A.
    Super User
    September 22, 2024

    "In the GCC toolchain, both C and C++ use the same linker, which is the ld linker. However, when linking C++ programs, the g++ driver is typically used instead of gcc. The g++ driver automatically links against the C++ standard library and handles other C++ specific linking requirements, but it still uses the ld linker under the hood"

    https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html