undefined reference to `app_main'

oarcher
Posts: 2
Joined: Tue May 07, 2024 4:50 pm

Re: undefined reference to `app_main'

Postby oarcher » 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:

Code: Select all

cmake_minimum_required(VERSION 3.6)
set(CMAKE_CXX_STANDARD 17)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(myproj)
And in main/myproj.cpp:

Code: Select all

extern "C" void app_main(void)
{
...
}

Who is online

Users browsing this forum: No registered users and 143 guests