Seafile-Client Windows Build

Hello Community,
I need to recompile Seafile-Client for Windows.
Followed docs for but it will not working peoperly. I’m getting error

python .\build-msi-vs.py 8.0.0
[INFO] Building libsearpc
[INFO] running devenv “C:\tools\seafile\scripts\build…\libsearpc/libsearpc.sln” /Rebuild “Release|x64”, cwd=C:\tools\seafile\scripts\build…\libsearpc

Microsoft Visual Studio 2019 Version 16.11.10.
Copyright (C) Microsoft Corp. All rights reserved.

The license for Visual Studio expires in 30 days.
Rebuild started…
1>------ Rebuild All started: Project: libsearpc, Configuration: Release x64 ------
1>searpc-client.c
1>C:\tools\libsearpc\lib\searpc-client.h(10,10): fatal error C1083: Cannot open include file: ‘glib.h’: No such file or directory
1>searpc-named-pipe-transport.c
1>C:\tools\libsearpc\lib\searpc-named-pipe-transport.c(4,10): fatal error C1083: Cannot open include file: ‘pthread.h’: No such file or directory
1>searpc-server.c
1>C:\tools\libsearpc\lib\searpc-server.c(7,10): fatal error C1083: Cannot open include file: ‘jansson.h’: No such file or directory
1>searpc-utils.c
1>C:\tools\libsearpc\lib\searpc-utils.c(2,10): fatal error C1083: Cannot open include file: ‘glib.h’: No such file or directory
1>Generating Code…
1>Done building project “libsearpc.vcxproj” – FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
[ERROR] error when running command:
devenv “C:\tools\seafile\scripts\build…\libsearpc/libsearpc.sln” /Rebuild “Release|x64”

Spent almost 2 days to resolve issue but nothing works properly
Is there anyone who can help?
Thank You

I have the same isssue. What I already found out:

after the installation of all dependencies using vcpkg i had to run the following command to integrate them into Visual Studio.

vcpkg integrate install

Currenty i have still some issues with glib on Windows.

Additionally the Script build-mssi-vs.py under seafile/scripts/build shows some more Informations.

  • QT has to be at Versio 5.15.1 and not 5.13.1

  • A Code Sigining Certificat has to be in place

  • wix has to be installed under C:\wix\bin

Code from Script

CERTFILE = “C:/certs/seafile.pfx”

QT_DIR = “C:/Qt/Qt5.15.1/5.15.1/msvc2019_64”

WIX_BIN = “C:/wix/bin”

OPENSSL_DIR = “C:/packagelib”

I hope someone from Seafile can clarify the issues and update the Documentation.

I made some Progress butt didn’t managed it to build windows.

  • Install VS Studio 2019 in English (important)
  • Install Wix
  • Install Parafin
  • Install vcpkg
  • Install QT 5.15.1 not 5.13.1

Installing third-party libraries

Install packages

vcpkg.exe install glib:x64-windows curl[core,openssl]:x64-windows openssl:x64-windows libevent:x64-windows jansson:x64-windows sqlite3:x64-windows pthreads:x64-windows getopt-win32:x64-windows

Make installed packages available user-wide

vcpkg integrate install

Copy Glib-2.0 Folder to VS2019 include Folder

Source: \vcpkg\packages\glib_x64-windows\include\glib-2.0
Destination C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include

Copy Glib.h File to VS2019 include Folder

Source: \vcpkg\packages\glib_x64-windows\include\glib-2.0\glib.h
Destination C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include
##Copy Glibconfig.h to VS2019 include Folder
Source: \vcpkg\packages\glib_x64-windows\lib\glib-2.0\include\glibconfig.h
Destination:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include

After That the Build Process starts without dependency issues and run for some time

python build-msi-vs.py 8.0.5

Then i get the following error:

`C:\src\seafile\scripts\build>python build-msi-vs.py 8.0.5
[INFO] Building libsearpc
[INFO] running devenv “C:\src\seafile\scripts\build…\libsearpc/libsearpc.sln” /Rebuild “Release|x64”, cwd=C:\src\seafile\scripts\build…\libsearpc

Microsoft Visual Studio 2019 Version 16.11.11.
Copyright (C) Microsoft Corp. All rights reserved.
Rebuild started…
1>------ Rebuild All started: Project: libsearpc, Configuration: Release x64 ------
1>searpc-client.c
1>C:\src\libsearpc\lib\searpc-client.c(77,66): warning C4311: ‘type cast’: pointer truncation from ‘void *’ to ‘long’
1>searpc-named-pipe-transport.c
1>searpc-server.c
1>searpc-utils.c
1>Generating Code…
1> Creating library C:\src\libsearpc\x64\Release\libsearpc.lib and object C:\src\libsearpc\x64\Release\libsearpc.exp
1>libsearpc.vcxproj → C:\src\libsearpc\x64\Release\libsearpc.dll
1>Done building project “libsearpc.vcxproj”.
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
[INFO] Building seafile
[INFO] running devenv C:\src\seafile\scripts\build…\seafile/seafile.sln /Rebuild “Release|x64”, cwd=C:\src\seafile\scripts\build…\seafile

Microsoft Visual Studio 2019 Version 16.11.11.
Copyright (C) Microsoft Corp. All rights reserved.
Rebuild started…
1>------ Rebuild All started: Project: seafile, Configuration: Release x64 ------
1>block-backend-fs.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>block-backend.c
1>block-mgr.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>branch-mgr.c
1>cdc.c
1>rabin-checksum.c
1>commit-mgr.c
1>curl-init.c
1>diff-simple.c
1>fs-mgr.c
1>cache-tree.c
1>index.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>C:\src\seafile\common\index\index.c(36,56): warning C4312: ‘type cast’: conversion from ‘int’ to ‘HANDLE’ of greater size
1>log.c
1>mq-mgr.c
1>obj-backend-fs.c
1>obj-store.c
1>rpc-service.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>seafile-crypt.c
1>vc-common.c
1>cevent.c
1>C:\src\seafile\daemon\cevent.c(39,70): warning C4312: ‘type cast’: conversion from ‘long’ to ‘gconstpointer’ of greater size
1>C:\src\seafile\daemon\cevent.c(78,77): warning C4312: ‘type cast’: conversion from ‘long’ to ‘gpointer’ of greater size
1>C:\src\seafile\daemon\cevent.c(80,68): warning C4312: ‘type cast’: conversion from ‘long’ to ‘gpointer’ of greater size
1>C:\src\seafile\daemon\cevent.c(87,68): warning C4312: ‘type cast’: conversion from ‘long’ to ‘gpointer’ of greater size
1>Generating Code…
1>Compiling…
1>change-set.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>clone-mgr.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>filelock-mgr.c
1>C:\src\seafile\daemon\filelock-mgr.c(336,46): warning C4311: ‘type cast’: pointer truncation from ‘gpointer’ to ‘long’
1>C:\src\seafile\daemon\filelock-mgr.c(360,42): warning C4311: ‘type cast’: pointer truncation from ‘gpointer’ to ‘long’
1>http-tx-mgr.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>C:\src\seafile\daemon\http-tx-mgr.c(1901,70): warning C4312: ‘type cast’: conversion from ‘long’ to ‘void *’ of greater size
1>C:\src\seafile\daemon\http-tx-mgr.c(3621,32): warning C4311: ‘type cast’: pointer truncation from ‘gpointer’ to ‘long’
1>C:\src\seafile\daemon\http-tx-mgr.c(3635,32): warning C4311: ‘type cast’: pointer truncation from ‘gpointer’ to ‘long’
1>job-mgr.c
1>repo-mgr.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>seaf-daemon.c
1>Importing getopt library
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>C:\src\seafile\daemon\seaf-daemon.c(84,42): warning C4113: ‘void (__cdecl *)()’ differs in parameter lists from ‘RegisterMarshalFunc’
1>seafile-config.c
1>seafile-error.c
1>seafile-session.c
1>set-perm.c
1>sync-mgr.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>sync-status-tree.c
1>timer.c
1>vc-utils.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>wt-monitor-structs.c
1>wt-monitor-win32.c
1>wt-monitor.c
1>db.c
1>net.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>Generating Code…
1>Compiling…
1>repo.c
1>task.c
1>utils.c
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\fcntl.h(53,1): warning C4005: ‘O_BINARY’: macro redefinition
1>C:\src\seafile\lib\utils.h(120): message : see previous definition of ‘O_BINARY’
1>Generating Code…
1>c_bpwrapper.cpp
1>LINK : fatal error LNK1104: cannot open file ‘common.lib’
1>Done building project “seafile.vcxproj” – FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
[ERROR] error when running command:
devenv C:\src\seafile\scripts\build…\seafile/seafile.sln /Rebuild “Release|x64”^^
`

Hi,
Do you already have seen the updated build manual?
https://manual.seafile.com/build_seafile/windows/

maybe @Jonathan can keep an eye on the seafile error

I see a problem with this line from you @bosborus
vcpkg.exe install glib:x64-windows curl[core,openssl]:x64-windows openssl:x64-windows
You are installing the latest openssl version (3.X)
But according to the manual we should use 1.1.

@daniel.pan @feiniks

i still got issues building seafile from source. following your documentation Windows - Seafile Admin Manual

It’s not clear what library versions we need to install with vcpkg

you say:

Third-party libraries include: glib, curl, openssl(version1.1.1d), openssl-windows(version1.1.1d-1), libevent, jansson, sqlite3, pthreads, getopt-win32

But your command only include the following components which will install latest openssl version

Install example:vcpkg.exe install curl[core,openssl]:x64-windows

I try to install all the libraries with the following command

vcpkg.exe install glib:x64-windows curl[core,openssl]:x64-windows openssl:x64-windows libevent:x64-windows jansson:x64-windows sqlite3:x64-windows pthreads:x64-windows getopt-win32:x64-windows

Additionally i had to copy multiple files form Glib to different folder to fix some issues (see my previous post)

Especially Building Breakpad is just a Pain on Windows. Cloud you please provide us a compiled version of all your dependencies in a zipped folder, so we don’t need to build them again and run in multiple issues?

Edit: I found a solution for Breakpad. I just Downloaded the latest Version from here which works without issues.

Thank you very much!

1 Like

Just as an Update:

I made some progress. It would be great, if you could mention in the manaual that we need to install the qt webengine module as well in the correct version.

Currently I get a lot of errors of Visual Studio all with the same proble. do you have any advice?

1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(20,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(36,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(42,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(45,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(50,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(53,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(58,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(63,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(73,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(75,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(78,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(82,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(87,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(92,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(95,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(100,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(105,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(108,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(116,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(124,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(132,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(140,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(143,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(148,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(153,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(156,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(161,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(164,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(174,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(182,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(185,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(188,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(191,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(195,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(198,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(204,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(210,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(216,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(219,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(222,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(23,41): error C2733: ‘abs’: you cannot overload a function with ‘extern “C”’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(466,38): message : see declaration of ‘abs’ (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(27,40): error C2733: ‘abs’: you cannot overload a function with ‘extern “C”’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(466,38): message : see declaration of ‘abs’ (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\cstdlib(31,46): error C2733: ‘abs’: you cannot overload a function with ‘extern “C”’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\ucrt\corecrt_math.h(466,38): message : see declaration of ‘abs’ (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\initializer_list(21,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\initializer_list(54,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\initializer_list(59,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(24,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(30,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(36,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(44,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(55,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(66,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(77,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(88,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(99,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(110,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(121,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(132,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(143,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(145,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(155,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(157,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(167,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(169,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(179,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(181,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(191,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(193,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(203,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(205,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(215,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(217,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(227,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(229,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(239,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(241,1): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(251,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(256,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(257,12): error C2733: ‘addressof’: you cannot overload a function with ‘extern “C”’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(252,27): message : see declaration of ‘std::addressof’ (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(259,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(264,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(265,27): error C2733: ‘_Unfancy’: you cannot overload a function with ‘extern “C”’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xstddef(260,27): message : see declaration of ‘std::_Unfancy’ (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(22,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(33,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(36,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(39,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(42,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(45,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(50,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(55,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(58,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(63,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(66,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(69,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(72,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(75,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(78,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(82,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(87,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(90,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(95,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-client.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\type_traits(95,10): fatal error C1003: error count exceeds 100; stopping compilation (compiling source file src\rpc\rpc-client.cpp)
1>rpc-server.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(20,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(36,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(42,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(45,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(50,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(53,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(58,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(63,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\xtr1common(73,10): error C2894: templates cannot be declared to have ‘C’ linkage (compiling source file src\rpc\rpc-server.cpp)

@daniel.pan @feiniks any reply to my issue?

Hello, I think you should use the latest tag of seafile, seafile-client and libsearpc. Then you can rebuild it.