love2d/megasource

How to compile win64 ?

dumk1217 opened this issue · 5 comments

cmake -G "Visual Studio 16 2019" -A Win64 -H. -Bbuild
fail

What are the error messages? I've recently succesfully compiled it using Visual Studio 2022.


** Visual Studio 2019 Developer Command Prompt v16.11.8
** Copyright (c) 2021 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'
Microsoft Windows [版本 10.0.17763.1577]
(c) 2018 Microsoft Corporation。保留所有权利。

C:\Users\admin\Desktop>cd megasource

C:\Users\admin\Desktop\megasource>cmake -G "Visual Studio 16 2019" -A Win64 -H. -Bbuild64
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.17763.
CMake Error at CMakeLists.txt:10 (project):
Failed to run MSBuild command:

C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe

to get the value of VCTargetsPath:

用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。

生成启动时间为 2021/12/28 11:50:46。
节点 1 上的项目“C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj”( 默认目标)。
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(820,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Win64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj]
已完成生成项目“C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。

生成失败。

“C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj”(默认目标) (1) ->
(_CheckForInvalidConfigurationAndPlatform 目标) ->
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(820,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Win64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj]

    0 个警告
    1 个错误

已用时间 00:00:00.51

Exit code: 1

-- Configuring incomplete, errors occurred!
See also "C:/Users/admin/Desktop/megasource/build64/CMakeFiles/CMakeOutput.log".

CMakeOutput.log
The system is: Windows - 10.0.17763 - AMD64

Normally you don't need to run Visual Studio command prompt. CMake will handle everything else.

Same result

C:\Users\admin\Desktop\megasource>cmake -G "Visual Studio 16 2019" -A Win64 -H. -Bbuild64
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.17763.
CMake Error at CMakeLists.txt:10 (project):
Failed to run MSBuild command:

C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe

to get the value of VCTargetsPath:

用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。

生成启动时间为 2021/12/28 11:57:08。
节点 1 上的项目“C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj”( 默认目标)。
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(820,5): error : The BaseOutputPath/OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='Win64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj]
已完成生成项目“C:\Users\admin\Desktop\megasource\build64\CMakeFiles\3.20.21032501-MSVC_2\VCTargetsPath.vcxproj”(默认目标)的操作 - 失败。

生成失败。

Ah, Win64 architecture doesn't exist. It's either x64 (default) or ARM64 (12.0 only, not officially supported)