при составлении проекта, который я получаю: < /p>
Код: Выделить всё
src/main.cpp:87: undefined reference to `cJSON_Init()'
collect2.exe: error: ld returned 1 exit status
< /code>
my cmakelists.txt: < /p>
cmake_minimum_required(VERSION 3.20.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(myProject)
# enable_language(CXX)
target_sources(app PRIVATE src/main.cpp)
zephyr_include_directories(src)
< /code>
meain.cpp: < /p>
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
int main(void)
{
cJSON_Init();
return 0;
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... stead-of-c
Мобильная версия