Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5530

General • Re: Adding pico-extras library to VS Code

$
0
0
The solution was as follows:

Add the following lines to CMakeLists.txt below the "include(pico_sdk_import.cmake)" line:

Code:

# We also need PICO EXTRASset(PICO_EXTRAS_PATH ${USERHOME}/<path>/pico-extras)<==== Change the path to the pico-extras folder hereinclude(${PICO_EXTRAS_PATH}/external/pico_extras_import.cmake)
Also needed is to add the individual libraries that are to be used to the target_link_libraries section of CMakeLists.txt as per Section 2.4 of the SDK. This important step is not covered in the getting started guide. In my case this looks like:

Code:

target_link_libraries(MyProject  <==== This will be the project name        pico_audio_i2s <==== This is the library I wish to use from pico-extras        pico_stdlib)
Thanks to @will-v-pi at the raspberrypi/pico-vscode integration Github site

Statistics: Posted by StarryPied — Fri Dec 06, 2024 2:11 pm



Viewing all articles
Browse latest Browse all 5530

Trending Articles