|
楼主 |
发表于 2009-5-16 20:48:52
|
显示全部楼层
The actual calls to the constructors are carried out by a subroutine called __main, which is called (automatically) at the beginning of the body of main (provided main was compiled with GNU CC). Calling __main is necessary, even when compiling C code, to allow linking C and C++ object code together. (If you use -nostdlib, you get an unresolved reference to __main, [color="Red"]since it's defined in the standard GCC library. Include -lgcc at the end of your compiler command line to resolve this reference.) 这个__main跟main()有什么分别得呢? |
|