pico-servo icon indicating copy to clipboard operation
pico-servo copied to clipboard

-lpico_servo no such file or directory

Open skeyvin opened this issue 3 years ago • 0 comments

did as the instructions said when i run make in my project folder i get /usr/lib/gcc/arm-none-eabi/12.2.0/../../../../arm-none-eabi/bin/ld: cannot find -lpico_servo: No such file or directory my cmake file for the project

# Generated Cmake Pico project file

cmake_minimum_required(VERSION 3.13)

set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

# Initialise pico_sdk from installed location
# (note this can come from environment, CMake cache etc)
set(PICO_SDK_PATH "/home/keyvan/Desktop/pico/pico-sdk")

# Pull in Raspberry Pi Pico SDK (must be before project)
include(pico_sdk_import.cmake)
include(./lib/RF24/CMakeLists.txt)
#include(lib/pico_servo/CMakeLists.txt)


project(test C CXX ASM)

# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()

# Add executable. Default name is the project name, version 0.1

add_executable(test test.cpp )

pico_set_program_name(test "test")
pico_set_program_version(test "0.1")

pico_enable_stdio_uart(test 1)
pico_enable_stdio_usb(test 1)

# Add the standard library to the build
link_directories(${CMAKE_SOURCE_DIR}/lib)
target_link_libraries(test pico_stdlib RF24 hardware_pwm pico_servo)
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR} lib/pico-servo/include)
#target_include_directories( lib/pico-servo/include)
# Add any user requested libraries
target_link_libraries(test
        hardware_spi
        hardware_pio
        hardware_adc
        pico_multicore
        hardware_pwm

        )

pico_add_extra_outputs(test)

skeyvin avatar Sep 13 '22 09:09 skeyvin