raspberrypi / pico-vscode

The official VS Code extension for Raspberry Pi Pico development. It includes several features to simplify project creation and deployment.
https://marketplace.visualstudio.com/items?itemName=raspberry-pi.raspberry-pi-pico
Mozilla Public License 2.0
124 stars 14 forks source link

C++ linker error #109

Open Slion opened 1 day ago

Slion commented 1 day ago

I'm trying to switch from the deprecated Pico Windows setup to this extensions but I'm getting C++ linker errors. Do I need to explicitly link against the C++ standard library somehow?

See: https://github.com/raspberrypi/pico-vscode/issues/100#issuecomment-2401789652

will-v-pi commented 1 day ago

Possibly related to #107 - does changing the compiler in cmake-kits.json to arm-none-eabi-g++.exe help?

Slion commented 1 day ago

Possibly related to #107 - does changing the compiler in cmake-kits.json to arm-none-eabi-g++.exe help?

Yes that did it. I changed:

"CXX": "${userHome}/.pico-sdk/toolchain/13_2_Rel1/bin/arm-none-eabi-gcc.exe"

to

"CXX": "${userHome}/.pico-sdk/toolchain/13_2_Rel1/bin/arm-none-eabi-g++.exe"

I left the C compiler to:

"C": "${userHome}/.pico-sdk/toolchain/13_2_Rel1/bin/arm-none-eabi-gcc.exe"
Slion commented 1 day ago

On #107 it is mentioned that this is not an issue when using the 2.0.0 SDK. I'm currently still using SDK 1.5.1 as a submodule so it could indeed be the case that this is working fine with 2.0.0 somehow.

Neril commented 1 day ago

RE: https://github.com/raspberrypi/pico-vscode/issues/109#issuecomment-2439491563 / @Slion

On https://github.com/raspberrypi/pico-vscode/issues/107 it is mentioned that this is not an issue when using the 2.0.0 SDK. I'm currently still using SDK 1.5.1 as a submodule so it could indeed be the case that this is working fine with 2.0.0 somehow.

No, I believe it is an issue on 2.0.0. My follow-up comment on there is just about the second of two additional notes I made about related wrong behavior (the .cmake file name). An example where an attempt to clarify / overload the issue hindered comprehension. Sorry!