Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

_main()?

Name: Anonymous 2008-07-16 19:24

/* When you make a function called main() in a GCC program, it wants
   this stuff too. */
void _main() { }


That comment is a lie, isn't it?

Name: Anonymous 2008-07-16 20:08

They are confused about what happens once it is compiled.  Your function named "main" gets converted internally to a symbol called "_main".  Compile "int main() { return 0; }" using gcc and then run nm on it to verify.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List