Very basic win32 app for "shaking" the screen, written in C using GDI.
The code migt be bad, sorry for that. If you have any corrections, let me know on my Discord server (I'm grialion#4595)!
I created this program and documentation, because I want to archive all the steps of creating/compiling Win32 apps on Linux.
Obviously you can compile it on Windows too, but I recommend using WSL for that. The instructions should work under an Ubuntu WSL.
-
You need to install MinGW-w64
- Arch Linux
$ sudo pacman -S mingw-w64-gcc
- Debian
$ sudo apt install gcc-mingw-w64-i686 # for Win32 $ sudo apt install gcc-mingw-w64-x86-64 # for Win64
- Arch Linux
-
Compiling the source
- Win32
i686-w64-mingw32-gcc -std=c99 -g main.c -lgdi32 -s -Os -o shakescreen.exe
- Win64
x86_64-w64-mingw32-gcc -std=c99 -g main.c -lgdi32 -s -Os -o shakescreen.exe
- Win32
-
Running it
I recommend using VirtualBox for this type of testing (if you know how to set up properly a Windows XP on qemu/kvm, please let me know on discord). Just set up a Windows XP, install guest additions and enable drag and drop and test it after compiling it.
- wipet for teaching me some of the methods used in the example code