Сборка Seafile-Client на Windows с использованием Cygwin
Я пытаюсь собрать SeaFile-клиент на Windows с использованием Cygwin. Когда я вызываю команду./configure, она определяет систему сборки как Linux
...
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for WIN32... no
checking for Mac... no
checking for Linux... compile in linux
checking for uuid_generate in -luuid... yes
found library uuid
...
он успешно сконфигурирован, но когда я вызываю команду make, возникает много ошибок. Я думаю, это из-за того, что он определяет систему сборки как Linux, но я думаю, что это должны быть окна. Как я могу сделать это решить?
сделать вывод ошибок:
Making all in daemon
make[2]: Entering directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4/daemon'
gcc -DHAVE_CONFIG_H -I. -I.. -DPKGDATADIR=\"/usr/local/share/seafile\" -DPACKAGE_DATA_DIR=\""/usr/local/share/seafile"\" -DSEAFILE_CLIENT -I../include -I../lib -I../lib -I../common -D_REENTRANT -I/usr/local/include -I/usr/local/include/searpc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -g -O2 -MT http-tx-mgr.o -MD -MP -MF .deps/http-tx-mgr.Tpo -c -o http-tx-mgr.o http-tx-mgr.c
http-tx-mgr.c: 'http_get' işlevinde:
http-tx-mgr.c:741:91: hata: expected ')' before 'USER_AGENT_OS'
headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
^~~~~~~~~~~~~
http-tx-mgr.c: 'http_put' işlevinde:
http-tx-mgr.c:865:91: hata: expected ')' before 'USER_AGENT_OS'
headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
^~~~~~~~~~~~~
http-tx-mgr.c: 'http_post' işlevinde:
http-tx-mgr.c:982:91: hata: expected ')' before 'USER_AGENT_OS'
headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
^~~~~~~~~~~~~
Üst düzeyde:
http-tx-mgr.c:507:1: UYARI: 'load_ca_bundle' defined but not used [-Wunused-function]
load_ca_bundle (CURL *curl)
^~~~~~~~~~~~~~
make[2]: *** [Makefile:581: http-tx-mgr.o] Error 1
make[2]: Leaving directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4/daemon'
make[1]: *** [Makefile:444: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4'
make: *** [Makefile:376: all] Error 2
этот код написан для кросс-компиляции и содержит много определений, как показано ниже:
...
#ifdef WIN32
#include <windows.h>
#include <wincrypt.h>
#endif
...
#ifndef SEAFILE_CLIENT_VERSION
#define SEAFILE_CLIENT_VERSION PACKAGE_VERSION
#endif
#ifdef WIN32
#define USER_AGENT_OS "Windows NT"
#endif
#ifdef __APPLE__
#define USER_AGENT_OS "Apple OS X"
#endif
#ifdef __linux__
#define USER_AGENT_OS "Linux"
#endif
#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__
#define USER_AGENT_OS "BSD"
#endif
...