Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###########################Cross Compiling for Windows on Linux###############
- #shell program for Linux
- gcc main.c -o main
- #shell program for Windows -- search apt for mingw
- i586-mingw32msvc-gcc main.c -o main.exe
- #GUI for Windows
- i586-mingw32msvc-gcc main_gui_win.c -o winhello.exe
- #GUI for Windows no shell window
- i586-mingw32msvc-gcc main_gui_win.c -o winhello.exe -mwindows
- #same can be done to main Shell programs run with out window
- i586-mingw32msvc-gcc main.c -o main.exe -mwindows
- #Embeding Icon into exe for Windows
- echo "id ICON res/icon.ico" > main.rc
- i586-mingw32msvc-windres -o res/icon.o main.rc #create resouces object
- i586-mingw32msvc-gcc main_gui_win.c res/icon.o -o winhello.exe -mwindows
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement