Re: undefined reference to `app_main'
Posted: Tue May 07, 2024 5:06 pm
I was also facing this issue, when trying to compile cpp files.
check that you have in your top CMakeLists.txt:
And in main/myproj.cpp:
check that you have in your top CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 17)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(myproj)
Code: Select all
extern "C" void app_main(void)
{
...
}