static library build error

mfawzy79
Posts: 17
Joined: Thu Feb 18, 2021 11:21 pm

static library build error

Postby mfawzy79 » 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
error.png
error.png (85.48 KiB) Viewed 1361 times
the file structure is as the following
file structure.png
file structure.png (37.43 KiB) Viewed 1361 times
and here is the content of main CMake file
  1. cmake_minimum_required(VERSION 3.5)
  2. set(COMPONENTS CBUF esptool_py)
  3. include($ENV{IDF_PATH}/tools/cmake/project.cmake)
  4. project(CBUF C)
while the content of the component CMake file
  1. idf_component_register(SRCS
  2. "src/CBUF_CORE.c"
  3. "src/CBUF_ELOG.c"
  4. "src/CBUF_FCFG.c"
  5. "src/CBUF_OS.c"
  6. INCLUDE_DIRS
  7. "include"
  8. "D:/temp1/GESAF_STACK/Environment/StdLog"
  9. "D:/temp1/GESAF_STACK/Environment/StdType"
  10. "D:/temp1/GESAF_STACK/Environment/EnvironmentAbstraction/include"
  11. "D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/ELOG/components/ELOG/include"
  12. "D:/temp1/GESAF_STACK/ServiceLayer/Diagnostic/PROBE/components/PROBE/include"
  13. PRIV_REQUIRES app_update spi_flash log)
  14. # After build, copy the archive file and header file to parent example directory's main component
  15. add_custom_command(TARGET ${COMPONENT_LIB}
  16.                    POST_BUILD
  17.                    COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${COMPONENT_LIB}> ${CMAKE_SOURCE_DIR}/lib
  18.                    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/include/CBUF.h ${CMAKE_SOURCE_DIR}/lib
  19.                    COMMENT "Copying built archive file and header to parent example directory...")

Who is online

Users browsing this forum: No registered users and 104 guests