Ошибка при компиляции Synergy на Linux Mint

SebCoding спросил: 28 марта 2018 в 01:40 в: linuxmint

Я пробовал следовать инструкциям, приведенным здесь: https://github.com/symless/synergy-core/wiki/Compiling#Ubuntu_1004_to_1510

Однако, каждый раз, когда я использую make, я получаю это error:

CMake Warning at cmake/Version.cmake:27 (message):
  Synergy version wasn't set.  Set to 2.0.0
Call Stack (most recent call first):
  CMakeLists.txt:48 (include)-- Full Synergy version string is '2.0.0-snapshot.b1-1cf3baed'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sszebrat/synergy-core/build
[  2%] Built target common
[ 13%] Built target arch
[ 22%] Built target base
[ 24%] Built target shared
[ 27%] Built target io
[ 30%] Built target mt
[ 36%] Built target net
[ 46%] Built target server
[ 54%] Built target platform
[ 55%] Built target client
[ 79%] Built target core
[ 80%] Built target synergy-core
[ 81%] Built target synergyc
[ 82%] Built target synergys
[ 83%] Built target gmock
[ 84%] Built target gtest
[ 85%] Linking CXX executable ../../../bin/integtests
../../lib/arch/libarch.a(ArchInternetUnix.cpp.o): In function `CurlFacade::CurlFacade()':
ArchInternetUnix.cpp:(.text+0x191): undefined reference to `curl_global_init'
ArchInternetUnix.cpp:(.text+0x212): undefined reference to `curl_easy_init'
../../lib/arch/libarch.a(ArchInternetUnix.cpp.o): In function `CurlFacade::~CurlFacade()':
ArchInternetUnix.cpp:(.text+0x34b): undefined reference to `curl_easy_cleanup'
ArchInternetUnix.cpp:(.text+0x350): undefined reference to `curl_global_cleanup'
../../lib/arch/libarch.a(ArchInternetUnix.cpp.o): In function `CurlFacade::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ArchInternetUnix.cpp:(.text+0x3b4): undefined reference to `curl_easy_setopt'
ArchInternetUnix.cpp:(.text+0x3d7): undefined reference to `curl_easy_setopt'
ArchInternetUnix.cpp:(.text+0x47a): undefined reference to `curl_easy_setopt'
ArchInternetUnix.cpp:(.text+0x4bb): undefined reference to `curl_easy_setopt'
ArchInternetUnix.cpp:(.text+0x4cd): undefined reference to `curl_easy_perform'
ArchInternetUnix.cpp:(.text+0x4ed): undefined reference to `curl_easy_strerror'
../../lib/arch/libarch.a(ArchInternetUnix.cpp.o): In function `CurlFacade::urlEncode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
ArchInternetUnix.cpp:(.text+0x69a): undefined reference to `curl_easy_escape'
ArchInternetUnix.cpp:(.text+0x753): undefined reference to `curl_free'
collect2: error: ld returned 1 exit status
src/test/integtests/CMakeFiles/integtests.dir/build.make:299: recipe for target 'bin/integtests' failed
make[2]: *** [bin/integtests] Error 1
CMakeFiles/Makefile2:1089: recipe for target 'src/test/integtests/CMakeFiles/integtests.dir/all' failed
make[1]: *** [src/test/integtests/CMakeFiles/integtests.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Я попытался исправить его, добавив эту строку в Cmakelists.txt:

link_libraries(libcurl)

, но это просто вызывает другую ошибку :

[  2%] Built target common
[ 13%] Built target arch
[ 22%] Built target base
[ 24%] Built target shared
[ 27%] Built target io
[ 30%] Built target mt
[ 36%] Built target net
[ 46%] Built target server
[ 54%] Built target platform
[ 55%] Built target client
[ 79%] Built target core
[ 80%] Linking CXX executable ../../../bin/synergy-core
/usr/bin/ld: cannot find -llibcurl
collect2: error: ld returned 1 exit status
src/cmd/core/CMakeFiles/synergy-core.dir/build.make:115: recipe for target 'bin/synergy-core' failed
make[2]: *** [bin/synergy-core] Error 1
CMakeFiles/Makefile2:802: recipe for target 'src/cmd/core/CMakeFiles/synergy-core.dir/all' failed
make[1]: *** [src/cmd/core/CMakeFiles/synergy-core.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Кто-нибудь знает, чтобы исправить это?

0 ответов