Skip to content

Add MinGW (Windows 10+) Target - #580

Open
7d4d9e33 wants to merge 4 commits into
redlib-org:mainfrom
7d4d9e33:windoze
Open

7d4d9e33 wants to merge 4 commits into
redlib-org:mainfrom
7d4d9e33:windoze

Conversation

@7d4d9e33

@7d4d9e33 7d4d9e33 commented Sep 28, 2026 •

Copy link
Copy Markdown

I have just implemented Windows 10+ 64 bit target for Redlib via MinGW.

Basically if you want to compile to Windows you can add x86_64-pc-windows-gnu target, install these packages below (Example is Debian and Ubuntu):

sudo apt-get install --no-install-suggests --no-install-recommends -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 nasm cmake

Then run this command in redlib directory:

CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc CXX_x86_64_pc_windows_gnu=x86_64-w64-mingw32-g++ BINDGEN_EXTRA_CLANG_ARGS="-I$(x86_64-w64-mingw32-gcc -print-file-name=include)" cargo build --release --target x86_64-pc-windows-gnu

On ubuntu adding -nobuiltininc flag to BINDGEN_EXTRA_CLANG_ARGS environment variable likely required because this flag used to work around Ubuntu's Clang issue where clang's headers causes conflict with MinGW ones.

After that you can go to target/x86_64-pc-windows-gnu/release, then you will see a file named redlib.exe. Now take and enjoy it:)

I also have tested environment variables and it works like a charm.

Prebuilt binary for those not bothering to build for testing: redlib-release-x86_64-pc-windows-gnu.zip

P.S. IMO CI should be improved, ReSukiSU has pretty good CI though especially when it comes to publishing artifact without creating release. For CI i have not test yet due to issue i said earlier, but should work.

yey, 64 bit windows build now available!
for mingw
try fix dependency problem
@7d4d9e33 7d4d9e33 changed the title Windoze Add MinGW (Windows 10+) Support Sep 28, 2026
@7d4d9e33 7d4d9e33 changed the title Add MinGW (Windows 10+) Support Add MinGW (Windows 10+) Target Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant