Build error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-24 1: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?
- Labels:
-
STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-24 1:39 PM
If you have main() function in a C++ file, perhaps use extern "C" so it exports
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-24 1:41 PM
That's not the case here, since i am using C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 1:25 AM
Hi @Jakub Dydyński
could you attach your output log and project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-27 2:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-03-29 4: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.
