Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char* argv[])
- {
- char str[256];
- sprintf(str, "gcc -shared %s.c -o %s.dll -mwindows", argv[1], argv[1]); // create dll
- system(str);
- sprintf(str, "windres --input %s.rc --output %s.res --output-format=coff", argv[1], argv[1]); // create .res
- system(str);
- sprintf(str, "gcc %s.c %s.dll %s.res -o %s.exe -mwindows", argv[1], argv[1], argv[1], argv[1]); // final linking and compiling
- system(str);
- }
Advertisement
Add Comment
Please, Sign In to add comment