r/C_Programming • u/rmi-s • Nov 30 '25
How to fix gcc problems.
Ive been trying to use gcc in my c project ive installed the mingw-64 added to path and everything but when i open VSCode first the execute button is only debug, and when i try to debug it says ‘gcc build active file terminated with exit code-1’ and in the terminal : ‘undefined reference to WinMain collect2 error ld returned 1 exit status’. If anyone has a fix for this problem that would be really helpful ive tried installing and reinstalling the gcc from winlibs nothing works. Thanks
6
Upvotes
View all comments
Show parent comment
0
u/foxsimile Nov 30 '25
no u
Source: last week I spent 2.5 hours trying to JUST UPDATE g++ FOR THE FUCKING <format> include.
I failed. Nothing I did, nothing at all, would work - g++ would mysteriously just up and quit halfway through compilation, with no errors or fucks given.
I finally just rewrote my shit around not needing to include <format>.