cancel
Showing results for 
Search instead for 
Did you mean: 

undefined reference to `main' error while Convert C project to CPP in STMCUBE IDE.

srikanth
Associate III

0693W000006H2TSQA0.pnghello,

I am trying to convert c project to CPP in STMCUBE IDE,

Now I generate the code to STM32H745(Dual core) and convert to CPP by using convert to CPP option in CUBE IDE.

I am getting following error

undefined reference to `main'. (check in attached screenshot)

But same way I generated code to single core MCU, I did not get this error.

Now how can I resolve this issue.

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

Check that you have converted both sub-projects CM4 and CM7 to C++ and make a clean build. Works here with STMCubeIDE 1.5.1.

The term "convert" is IMHO misleading, it only changes the tool chain settings to enable C++ compilation.

View solution in original post

1 REPLY 1
KnarfB
Principal III

Check that you have converted both sub-projects CM4 and CM7 to C++ and make a clean build. Works here with STMCubeIDE 1.5.1.

The term "convert" is IMHO misleading, it only changes the tool chain settings to enable C++ compilation.