1
mirror of https://github.com/rclone/rclone synced 2024-12-10 22:33:56 +01:00

docs/librclone: the newer and recommended ucrt64 subsystem of msys2 can now be used for building on windows

This commit is contained in:
albertony 2024-01-01 21:36:50 +01:00
parent fba2d4c4a7
commit 3bf8c877c3

View File

@ -12,16 +12,17 @@ notice will be removed.
The shims are a thin wrapper over the rclone RPC. 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 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, C compiler (GCC or Clang). On Windows you can use the MinGW ports, e.g. by installing
e.g. by installing it in a [MSYS2](https://www.msys2.org) distribution in a [MSYS2](https://www.msys2.org) distribution (you may now install GCC in the newer
(make sure you install GCC in the classic mingw64 subsystem, the ucrt64 version and recommended UCRT64 subsystem, however there were compatibility issues with previous
is not compatible with cgo). 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 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 go build --buildmode=c-archive -o librclone.a github.com/rclone/rclone/librclone