sudo apt-get install gcc-multilib-i686-linux-gnu export GOROOT=$HOME/opt/go-legacy-win7/ export PATH=$HOME/opt/go-legacy-win7/bin/:"$PATH" env GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ CGO_LDFLAGS="-lssp" go build -ldflags="-s -w" -o app1.exe main.go
Ou encore avec zig
env CGO_ENABLED=1 GOROOT=~/opt/go-legacy-win7/ GOOS=windows GOARCH=386 CC="zig cc -target i686-linux-musl" ~/opt/go-legacy-win7/bin/go build hello.go
mkdir -p ~/myapp/prefix export WINEPREFIX=$HOME/myapp/prefix export WINEARCH=win32 export WINEPATH=$HOME/myapp wineboot --init env WINEARCH=win32 wine app1.exe
$ exiftool app1.exe ExifTool Version Number : 13.50 File Name : app1.exe Directory : . File Size : 1266 kB File Modification Date/Time : 2026:04:23 19:18:49+02:00 File Access Date/Time : 2026:04:23 19:19:08+02:00 File Inode Change Date/Time : 2026:04:23 19:18:49+02:00 File Permissions : -rwxrwxr-x File Type : Win32 EXE File Type Extension : exe MIME Type : application/octet-stream Machine Type : Intel 386 or later, and compatibles Time Stamp : 0000:00:00 00:00:00 Image File Characteristics : Executable, No line numbers, No symbols, 32-bit, No debug PE Type : PE32 Linker Version : 2.45 Code Size : 571904 Initialized Data Size : 693248 Uninitialized Data Size : 154624 Entry Point : 0x1460 OS Version : 6.1 Image Version : 1.0 Subsystem Version : 6.1 Subsystem : Windows command line