无法在 ubuntu 16.04 中安装 Cryengine 5

无法在 ubuntu 16.04 中安装 Cryengine 5

我正在尝试在 ubuntu 16.04 上安装 cryengine 5。我正在使用他们提供的源代码和 sdkgithub 仓库。这是我使用的编译命令:

./cry_waf.sh build_linux_x64_gcc_profile --project-spec=gamesdk

在此之前我所做的就是将 GameSDK 内容复制到 CryEngine 的root/Code/SDKs文件夹中。

这是我收到的错误:

In file included from /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/CryAction_main_uber_3.cpp:5:0:
/home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/../../../Code/CryEngine/CryAction/SimpleHttpServer/SimpleHttpServerListener.cpp: In member function ‘virtual void CSimpleHttpServerListener::OnGetRequest(int, string)’:
/home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/../../../Code/CryEngine/CryAction/SimpleHttpServer/SimpleHttpServerListener.cpp:251:52: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Werror=unused-result]
     fread((char*)page.data(), 1, page.size(), file);
                                                    ^
cc1plus: all warnings being treated as errors
^[[1;3C
In file included from /home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon/CryCore/Assert/CryAssert_impl.h:23:0,
                 from /home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon/CryCore/Platform/platform_impl.inl:144,
                 from /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/../../../Code/CryEngine/CryAction/CryAction.cpp:28,
                 from /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/CryAction_main_uber_1.cpp:14:
/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon/CryAssert/CryAssert_Linux.h: In function ‘bool CryAssert(const char*, const char*, unsigned int, bool*)’:
/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon/CryAssert/CryAssert_Linux.h:103:37: error: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Werror=unused-result]
   fscanf(assert_file, "%d", &result);
                                     ^
cc1plus: all warnings being treated as errors
Build failed
 -> task in 'cxx (linux_x64_gcc|profile)' failed (exit status 1): 
    {task 140323113462352: cxx CryAction_main_uber_3.cpp -> CryAction_main_uber_3.cpp.1.o}
'g++ -m64 -Wall -Werror -ffast-math -fvisibility=hidden -Wno-char-subscripts -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-value -Wno-parentheses -Wno-switch -Wno-unused-function -Wno-multichar -Wno-format-security -Wno-empty-body -Wno-comment -Wno-char-subscripts -Wno-sign-compare -Wno-narrowing -Wno-write-strings -Wno-format -Wno-strict-aliasing -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-strict-overflow -Wno-uninitialized -Wno-unused-local-typedefs -Wno-deprecated -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -std=c++11 -Wno-invalid-offsetof -Wno-reorder -Wno-conversion-null -Wno-overloaded-virtual -O2 -msse2 -MD -g2 -gdwarf-2 -fpic -fpic -I/home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/linux_x64_gcc_profile/_shared/Code/CryEngine/CryAction -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryAction -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs/boost -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs/yasli -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/Libs/yasli -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryAction -DCODE_BASE_FOLDER="/home/cortana/Desktop/CRYENGINE-5.1.1/Code/" -D_PROFILE -DPROFILE -DLINUX -D__linux__ -DLINUX64 -DSWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR -D_MT -D_DLL -DCRY_FEATURE_SCALEFORM_HELPER -D_USRDLL -DEXE_VERSION_INFO_0=1 -DEXE_VERSION_INFO_1=0 -DEXE_VERSION_INFO_2=0 -DEXE_VERSION_INFO_3=0 /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/CryAction_main_uber_3.cpp -c -o /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/linux_x64_gcc_profile/_shared/BinTemp/uber_files/CryAction/CryAction_main_uber_3.cpp.1.o'
 -> task in 'cxx (linux_x64_gcc|profile)' failed (exit status 1): 
    {task 140323113462288: cxx CryAction_main_uber_1.cpp -> CryAction_main_uber_1.cpp.1.o}
'g++ -m64 -Wall -Werror -ffast-math -fvisibility=hidden -Wno-char-subscripts -Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-value -Wno-parentheses -Wno-switch -Wno-unused-function -Wno-multichar -Wno-format-security -Wno-empty-body -Wno-comment -Wno-char-subscripts -Wno-sign-compare -Wno-narrowing -Wno-write-strings -Wno-format -Wno-strict-aliasing -Wno-unused-but-set-variable -Wno-maybe-uninitialized -Wno-strict-overflow -Wno-uninitialized -Wno-unused-local-typedefs -Wno-deprecated -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -std=c++11 -Wno-invalid-offsetof -Wno-reorder -Wno-conversion-null -Wno-overloaded-virtual -O2 -msse2 -MD -g2 -gdwarf-2 -fpic -fpic -I/home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/linux_x64_gcc_profile/_shared/Code/CryEngine/CryAction -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryAction -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs/boost -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs/yasli -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/Libs/yasli -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryCommon -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs -I/home/cortana/Desktop/CRYENGINE-5.1.1/Code/CryEngine/CryAction -DCODE_BASE_FOLDER="/home/cortana/Desktop/CRYENGINE-5.1.1/Code/" -D_PROFILE -DPROFILE -DLINUX -D__linux__ -DLINUX64 -DSWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR -D_MT -D_DLL -DCRY_FEATURE_SCALEFORM_HELPER -D_USRDLL -DEXE_VERSION_INFO_0=1 -DEXE_VERSION_INFO_1=0 -DEXE_VERSION_INFO_2=0 -DEXE_VERSION_INFO_3=0 /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/uber_files/CryAction/CryAction_main_uber_1.cpp -c -o /home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/linux_x64_gcc_profile/_shared/BinTemp/uber_files/CryAction/CryAction_main_uber_1.cpp.1.o'

此外,我收到以下警告和错误:

[WARNING] No default compiler found, enabling compiler auto-detection
[WAF] Executing 'build_linux_x64_gcc_profile' in '/home/cortana/Desktop/CRYENGINE-5.1.1/BinTemp/linux_x64_gcc_profile/_shared'
[WARNING] /home/cortana/Desktop/CRYENGINE-5.1.1/Code/SDKs/Scaleform not found, this feature is excluded from this build.
[WARNING] NVAPI SDK not found, excluding from the build.
[WARNING] AMD AGS SDK not found, excluding from the build.
MSVC 14.0 is not being used - CryRenderD3D12 cannot be built.
[WARNING] SDL_Mixer binaries missing
[ERROR] Attempting to build CryAudioImplFmod, but could not find the Fmod SDK at Code/SDKs/Audio/fmod, skipping.
[ERROR] Attempting to build CryAudioImplWwise, but could not find the Wwise SDK at Code/SDKs/Audio/AK, skipping.

我不明白为什么会出现这些错误以及如何删除它们。我已经安装了 g++,所以不应该出现第一个警告。对于sdl_mixer,我安装了libsdl2-devlibsdl2-mixer-dev,它仍然说缺少二进制文件。我已经从存储库下载了整个 GameSDK,但它仍然说缺少某些内容。我该如何解决这些错误并编译和运行 Cryengine?

答案1

很简单!在互联网上搜索了很多次后,我什么也没找到,但答案是在 cryengine 网站上,但他们使用(可选)。只需打开终端并输入

sudo apt-get 安装 clang

然后放

./cry_waf.sh build_linux_x64_clang_profile --project-spec=gamesdk

并不是

./cry_waf.sh build_linux_x64_gcc_profile --project-spec=gamesdk

我希望我能帮到你,如果我的英语不好,那也只是七年级的英语

相关内容