2023-03-24 01:25 PM
Hi, i have a STM32Cube project, that builds in stm32cubeide, however when porting it to VSCode extension and trying to build with cmake i get linker error saying: ../arm-none-eabi/lib/crt0.o: in function `_mainCRTStartup': undefined reference to 'main'. Does anyone have any ideas how to solve that?
2023-03-24 01:39 PM
If you have main() function in a C++ file, perhaps use extern "C" so it exports
2023-03-24 01:41 PM
That's not the case here, since i am using C
2023-03-27 01:25 AM
Hi @Jakub Dydyński
could you attach your output log and project
2023-03-27 02:25 PM
2023-03-29 04:22 AM
> _mainCRTStartup
https://learn.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol
That function is a C runtime entry-point for Windows console applications. Probably you are building a Windows application instead of ARM firmware.