Keil Linker Error L6218E on removing main.c

Hi Forum,

I created a project in STM32CubeMx and generated the code.

Then I removed my main.c from the build list as I wanted the main.cpp file to write my code.

and then added main.cpp file -

but now i'm getting build error -

also after the build is completed i continuously get the following message -

Is there some configuration that may be missing here?