The solution was as follows:
Add the following lines to CMakeLists.txt below the "include(pico_sdk_import.cmake)" line:
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:
Thanks to @will-v-pi at the raspberrypi/pico-vscode integration Github site
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)
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)
Statistics: Posted by StarryPied — Fri Dec 06, 2024 2:11 pm