static library build error
Posted: Sun Feb 28, 2021 6:53 am
I have a code which is generating static library, the toolchain is generating the .a but i'm getting error as the following
while the content of the component CMake file
the file structure is as the following
and here is the content of main CMake file
- cmake_minimum_required(VERSION 3.5)
- set(COMPONENTS CBUF esptool_py)
- include($ENV{IDF_PATH}/tools/cmake/project.cmake)
- project(CBUF C)
- idf_component_register(SRCS
- "src/CBUF_CORE.c"
- "src/CBUF_ELOG.c"
- "src/CBUF_FCFG.c"
- "src/CBUF_OS.c"
- INCLUDE_DIRS
- "include"
- "D:/temp1/GESAF_STACK/Environment/StdLog"
- "D:/temp1/GESAF_STACK/Environment/StdType"
- "D:/temp1/GESAF_STACK/Environment/EnvironmentAbstraction/include"
- "D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/ELOG/components/ELOG/include"
- "D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/PROBE/components/PROBE/include"
- PRIV_REQUIRES app_update spi_flash log)
- # After build, copy the archive file and header file to parent example directory's main component
- add_custom_command(TARGET ${COMPONENT_LIB}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${COMPONENT_LIB}> ${CMAKE_SOURCE_DIR}/lib
- COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/include/CBUF.h ${CMAKE_SOURCE_DIR}/lib
- COMMENT "Copying built archive file and header to parent example directory...")