Due to server problems the website is temporarily offline! Visit http://www.smorgasbordet.com/pellesc/ to download Pelles C.
#ifdef __GNUC__// IMAGE_SCN_LNK_INFO | IMAGE_SCN_LNK_REMOVEvoid comment_linker(void) { __asm__(".section .drectve, \"ney\"\n" "\t.string \"-defaultlib:msvcrt.lib -subsystem:console\"\n" "\t.section .text");}void __main(void) {}#else#pragma comment(lib, "msvcrt.lib")#pragma comment(linker,"/subsystem:console")#endifvoid __cdecl mainCRTStartup(void){ int __cdecl main(int argc, char **argv); int __cdecl __getmainargs(int*, char***, char***, int, void*); void __cdecl exit(int status); int argc; char** argv; char** env; int sinfo = 0; __getmainargs(&argc,&argv,&env,0,&sinfo); exit(main(argc,argv));}
#ifdef __GNUC__// IMAGE_SCN_LNK_INFO | IMAGE_SCN_LNK_REMOVEvoid comment_linker(void) { __asm__(".section .drectve, \"ney\"\n" "\t.string \"-defaultlib:msvcrt.lib -subsystem:console\"\n" "\t.section .text");}void __main(void) {}#else#pragma comment(lib, "msvcrt.lib")#pragma comment(linker,"/subsystem:console")#endif//void __main(void) {}void __cdecl mainCRTStartup(void){ int __cdecl main(int argc, char **argv); int __cdecl __getmainargs(int*, char***, char***, int, void*); void __cdecl exit(int status); int argc; char** argv; char** env; int sinfo = 0; __getmainargs(&argc,&argv,&env,0,&sinfo); main(argc,argv); exit(0);}int printf(const char * format, ...);int strlen(const char *string);char * strcpy(char * restrict dst, const char * restrict src);char * strcat(char * restrict dst, const char * restrict src);int strcmp(const char *string1, const char *string2);int system(const char *string);int __cdecl main(int argc, char **argv){ char scmd[1024]; // commandline int ipar = 0; // parameter status int i; strcpy(scmd, argv[0]); i = strlen(scmd) - 1; while (scmd[i] && scmd[i] != '/' && scmd[i] != '\\') scmd[i--] = 0; strcat(scmd, "polink.exe ");/* for (int i=0; i<argc; i++) { printf("%s\n", argv[i]); } printf("\n");*/ for (int i=0; i<argc; i++) { if (!ipar && !strcmp(argv[i], "crtbegin.o")) { ipar = 1; i++; } if (!strcmp(argv[i], "crtend.o")) { //ipar = 3; break; } if (!ipar && argv[i][0] == '-') { // parameters that are interest if (argv[i][1] == 'o') { strcat(scmd, " -out:"); if (scmd, argv[i][2]) strcat(scmd, &argv[i][2]); else { i++; strcat(scmd, argv[i]); } strcat(scmd, " "); } } if (ipar == 1 && argv[i][0] != '-') { // parameters that are interest while (argv[i][0] != '-') { //printf("%s\n", argv[i]); strcat(scmd, argv[i]); strcat(scmd, " "); if (i<argc) i++; else break; } } if (ipar == 1 && argv[i][0] == '-') { // parameters that are interest if (argv[i][1] == 'l') { if (!strcmp(argv[i], "-lmingw32")) break; strcat(scmd, " "); strcat(scmd, &argv[i][2]); strcat(scmd, ".lib"); } if (argv[i][1] == 'L') { strcat(scmd, " -libpath:"); strcat(scmd, &argv[i][2]); strcat(scmd, " "); } } //printf("%s\n", argv[i]); } //printf("\n%s\n", scmd); system(scmd); return 0;}