From 3bf8c877c3394a289d03bdd08a4d09c06e69e22b Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Mon, 1 Jan 2024 21:36:50 +0100 Subject: [PATCH] docs/librclone: the newer and recommended ucrt64 subsystem of msys2 can now be used for building on windows --- librclone/README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/librclone/README.md b/librclone/README.md index 3b80f9f98..7566d3091 100644 --- a/librclone/README.md +++ b/librclone/README.md @@ -12,16 +12,17 @@ notice will be removed. The shims are a thin wrapper over the rclone RPC. The implementation is based on cgo; to build it you need Go and a GCC compatible -C compiler (GCC or Clang). On Windows you can use the MinGW port of GCC, -e.g. by installing it in a [MSYS2](https://www.msys2.org) distribution -(make sure you install GCC in the classic mingw64 subsystem, the ucrt64 version -is not compatible with cgo). +C compiler (GCC or Clang). On Windows you can use the MinGW ports, e.g. by installing +in a [MSYS2](https://www.msys2.org) distribution (you may now install GCC in the newer +and recommended UCRT64 subsystem, however there were compatibility issues with previous +versions of cgo where, if not force rebuild with go build option `-a` helped, you had +to resort to the classic MINGW64 subsystem). -Build a shared library like this: +Build a shared library like this (change from .so to .dll on Windows): go build --buildmode=c-shared -o librclone.so github.com/rclone/rclone/librclone -Build a static library like this: +Build a static library like this (change from .a to .lib on Windows): go build --buildmode=c-archive -o librclone.a github.com/rclone/rclone/librclone