1 //==========================================
2 // LIBCTINY - Matt Pietrek 2001
3 // MSDN Magazine, January 2001
5 //==========================================
11 // Force the linker to include KERNEL32.LIB
12 #pragma comment(linker, "/defaultlib:kernel32.lib")
14 //#pragma comment(linker, "/nodefaultlib:libc.lib")
15 //#pragma comment(linker, "/nodefaultlib:libcmt.lib")
17 extern "C" int __cdecl
main(int, char **, char **); // In user's code
19 extern "C" void DoInitialization();
20 extern "C" void DoCleanup();
23 // Modified version of the Visual C++ startup code. Simplified to
24 // make it easier to read. Only supports ANSI programs.
26 extern "C" void __cdecl
mainCRTStartup() {
29 argc
= _ConvertCommandLineToArgcArgv( );
31 // set up our minimal cheezy atexit table
34 // Call C++ constructors
35 _initterm( __xc_a
, __xc_z
);
37 // DoInitialization();
39 mainret
= main( argc
, _ppszArgv
, 0 );