g++ crashed when I tried to compile a program with ONE LINE

You haven’t defined main() function in your program.

As said in error:

(.text+0x20): undefined reference to `main'

PS:

This is not crash of g++, it just shows error message when can’t find definition of main().

Leave a Comment