我正在使用 Visual Studio 2017 在 Windows 上构建搅拌机。
我已经通过 Git 提取了 blender 的源代码,并且通过 svn 提取了库,我下载并安装了 CUDA 支持。
我运行后得到以下输出build.bat release
。
CMake Error: Could not create named generator Visual Studio 12 2013 Win64
Generators
Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 8 2005 [arch] = Deprecated. Generates Visual Studio 2005
project files. Optional [arch] can be
"Win64".
Borland Makefiles = Generates Borland makefiles.
NMake Makefiles = Generates NMake makefiles.
NMake Makefiles JOM = Generates JOM makefiles.
Green Hills MULTI = Generates Green Hills MULTI files
(experimental, work-in-progress).
MSYS Makefiles = Generates MSYS makefiles.
MinGW Makefiles = Generates a make file for use with
mingw32-make.
Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Watcom WMake = Generates Watcom WMake makefiles.
CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
CodeBlocks - NMake Makefiles JOM
= Generates CodeBlocks project files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - MinGW Makefiles = Generates CodeLite project files.
CodeLite - NMake Makefiles = Generates CodeLite project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Sublime Text 2 - MinGW Makefiles
= Generates Sublime Text 2 project files.
Sublime Text 2 - NMake Makefiles
= Generates Sublime Text 2 project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
Kate - MinGW Makefiles = Generates Kate project files.
Kate - NMake Makefiles = Generates Kate project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Eclipse CDT4 - NMake Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - MinGW Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
CMake Error: Could not create named generator Visual Studio 14 2013 Win64
Generators
Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 11 2012 [arch] = Generates Visual Studio 2012 project files.
Optional [arch] can be "Win64" or "ARM".
Visual Studio 10 2010 [arch] = Generates Visual Studio 2010 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 9 2008 [arch] = Generates Visual Studio 2008 project files.
Optional [arch] can be "Win64" or "IA64".
Visual Studio 8 2005 [arch] = Deprecated. Generates Visual Studio 2005
project files. Optional [arch] can be
"Win64".
Borland Makefiles = Generates Borland makefiles.
NMake Makefiles = Generates NMake makefiles.
NMake Makefiles JOM = Generates JOM makefiles.
Green Hills MULTI = Generates Green Hills MULTI files
(experimental, work-in-progress).
MSYS Makefiles = Generates MSYS makefiles.
MinGW Makefiles = Generates a make file for use with
mingw32-make.
Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Watcom WMake = Generates Watcom WMake makefiles.
CodeBlocks - MinGW Makefiles = Generates CodeBlocks project files.
CodeBlocks - NMake Makefiles = Generates CodeBlocks project files.
CodeBlocks - NMake Makefiles JOM
= Generates CodeBlocks project files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - MinGW Makefiles = Generates CodeLite project files.
CodeLite - NMake Makefiles = Generates CodeLite project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Sublime Text 2 - MinGW Makefiles
= Generates Sublime Text 2 project files.
Sublime Text 2 - NMake Makefiles
= Generates Sublime Text 2 project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
Kate - MinGW Makefiles = Generates Kate project files.
Kate - NMake Makefiles = Generates Kate project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Eclipse CDT4 - NMake Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - MinGW Makefiles
= Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
Microsoft (R) Build Engine version 15.4.8.50001 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: D:\Users\brazg\Documents\GitHub\blender\..\build_windows_Release_x64_vc14_Release\Blender.sln
"Build Failed"
它不喜欢使用 vc12 以上的任何内容,而我正尝试让它这样做。
我是否遗漏了什么?
make.bat 中也有引用 vc 2017 的代码:
else if "%1" == "x64" (
set BUILD_ARCH=x64
) else if "%1" == "2017" (
set BUILD_VS_VER=15
set BUILD_VS_YEAR=2017
set BUILD_VS_LIBDIRPOST=vc14
答案1
还有一个文件需要编辑。
第一的,平台_win32.cmake有错误。
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
我在set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc15)
第 147 行和第 150 行将以下内容改为:14. WIN32_VC14版本不存在。第 147 行和第 150 行是关于检测 VS2017 的,所以他们应该说1. 运行 win32_vc15。
下一个制作脚本确实需要一些编辑,但不是很多。我注释掉了 187 至 202 行的健全性检查块;
:sanity_checks REM Sanity Checks ::where /Q msbuild ::if %ERRORLEVEL% NEQ 0 ( :: if "%BUILD_VS_VER%"=="12" ( :: rem vs12 not found, try vs14 :: echo Visual Studio 2013 not found, trying Visual Studio 2015. :: set BUILD_VS_VER=15 :: set BUILD_VS_YEAR=2017 :: set BUILD_VS_LIBDIRPOST=vc15 :: goto DetectMSVC :: ) else ( ::"" echo Error: "MSBuild" command not in the PATH. :: echo You must have MSVC installed and run this from the "Developer Command ::Prompt" :: echo ^(available from Visual Studio's Start menu entry^), aborting! :: goto EOF :: ) ::)
以及第 83 至 87 行:
::set BUILD_VS_VER=14 ::set BUILD_VS_YEAR=2015 ::set BUILD_VS_LIBDIRPOST=vc14 ::) else if "%1" == "2013" ( ::set BUILD_VS_VER=12 ::set BUILD_VS_YEAR=2013 ::set BUILD_VS_LIBDIRPOST=vc12
否则,它仍然寻找VC12型。
第 81 行也应该从:编辑
set BUILD_VS_LIBDIRPOST=vc14
为set BUILD_VS_LIBDIRPOST=vc15
第 81 行也与查找 VS2017 有关,因此我不确定为什么将其设置为VC14型。
编辑:第 162 行:if DEFINED VisualStudioVersion goto msvc_detect_finally
需要更改为:if DEFINED VisualStudioVersion goto msvc_detect_finally_2017
之后,编译运行得很好01:29:42.49,但仍然失败,可能是因为找不到 pthread.h 或 zlib.h 或一些其他头文件。
感谢你@Ramhound 的所有帮助。如果您有更多信息,我很乐意尽快与您聊天。我在下面附上了我的 Build.log 链接,以防万一。