我正在尝试从开源游戏trying编译Spring大厅版本268客户端。但是,最新版本(271)编译得很好。但是,当我试图编译268版本时,我会得到CMake错误:
CMake Error at /usr/share/cmake-3.18/Modules/FindCURL.cmake:163 (message):
CURL: Required feature libcurl is not found
Call Stack (most recent call first):
src/CMakeLists.txt:127 (FIND_PACKAGE)我正在Debian测试上编译,并尝试了库libcurl4-openssl-dev、libcurl-gnutls-dev和libcurl4-nss-dev,但都没有成功。
大堂0.271:https://github.com/springlobby/springlobby
大堂0.268:https://github.com/springlobby/springlobby/tree/0.268
从源安装:https://github.com/springlobby/springlobby/wiki/Installfromsource
用git回购建造大厅:
git clone --recursive https://github.com/springlobby/springlobby.git
cd springlobby
cmake .
make
make installSpring大厅版本271使用libcurl4-openssl-dev,但268版似乎链接到了一个较旧的libcurl。
发布于 2021-04-09 10:01:47
268版本错误地调用了find_package (src/CMakeLists.txt:127):
FIND_PACKAGE( CURL REQUIRED libcurl )将最后一个参数libcurl (根据包装文件)解释为COMPONENTS列表的元素,如果是FindCURL.cmake,则将其视为协议/特性规范。显然,libcurl既不意味着协议也不意味着特性。
提交https://github.com/springlobby/springlobby/commit/252c4cb156c1442ed9b4faec3f26265bc7c295ff修复此调用
FIND_PACKAGE(CURL REQUIRED)发布于 2021-04-09 15:41:05
Springlobby 0.268支持老的大厅服务器,上面有大多数玩家,也支持更新的服务器。
因此,如果您想编译和使用老版本的0.268 So大厅,您必须像我已经写过的那样克隆当前版本,然后再通过以下方式选择旧版本:
git checkout 0.268在src/CMakeLists.txt第127行中应用Tsyvarev发布的补丁。但你也必须加上:
#include <string>对于下面的文件src/battlelist.h和src/utils/sortutil.h,这些文件顶部的包含。
https://stackoverflow.com/questions/67018666
复制相似问题