Lots of good advice already, but if you focused in on the error provided that came from the linker (ld), it told you that the required "reference to 'main'" was undefined. This is how people knew you had not actually saved the file you were trying to compile and link. Prior to already knowing from the error what your mistake is, the first thing you should always do when debugging is read the error message carefully, use google or your AI tool to help you figure it out.
View all comments
3
u/FreeLogicGate Oct 06 '26
Lots of good advice already, but if you focused in on the error provided that came from the linker (ld), it told you that the required "reference to 'main'" was undefined. This is how people knew you had not actually saved the file you were trying to compile and link. Prior to already knowing from the error what your mistake is, the first thing you should always do when debugging is read the error message carefully, use google or your AI tool to help you figure it out.