Skip to content
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.

Building for Windows

Hansem Ro edited this page Jun 14, 2022 · 4 revisions

Cross-Compiling with MSYS2/MinGW-w64 on Windows

  1. Install MSYS2 from https://www.msys2.org/

  2. Launch "MSYS2 MSYS" from Start menu

  3. Run pacman -Syu && pacman -S mingw-w64-cross-gcc scons make git inside MSYS2 shell

  4. Clone repo

git clone https://github.com/hansemro/GDClip
  1. Retrieve submodules
cd GDClip && make prep
  1. Fix line 71 in ./godot-cpp/SConstruct by replacing
if sys.platform.startswith("linux"):

with

if sys.platform.startswith("linux") or sys.platform == "cygwin":
  1. Build with CXX=x86_64-w64-mingw32-g++ make PLATFORM=windows (parallelize build by setting NPROC variable)

  2. Retrieve built library at ./bin/libgdclip.dll

MinGW-w64 error: error: 'CLSID_WICPngDecoder2' was not declared in this scope; did you mean 'CLSID_WICPngDecoder'?

Solution: Update MinGW-w64 toolchain to 8.0.0 or newer (provides GCC 10.x+).

Related: https://github.com/dacap/clip/issues/51