Closed car520120 closed 3 years ago
msvc自带ninja
我安装的是 vs2019 不知道怎么加载你这个工程的,直接在命令行是编译不了的!
安装msvc把clang工具集勾上就有ninja。或者自己下载一个ninja,也比你把ninja脚本翻译成xmake简单很多。
能加一下你的联系方式吗?直接给我发一个 win10 luamake 可以的吗?ninja 我已经安装过的了,因为执行脚本安装不了
有什么问题就在这里解决
下面是的执行安装过程:不知道错在那的了 谢谢,大神的了
compile.ninja
msvc_deps_prefix = 注意: 包含文件:
subninja compile/ninja/msvc.ninja
D:\Home\Learn\vscode\luamake>vcvarsamd64_x86.bat
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.3
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
D:\Home\Learn\vscode\luamake>compile/install.bat
'compile' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
D:\Home\Learn\vscode\luamake>.\compile\install.bat
D:\Home\Learn\vscode\luamake>ninja -f build\msvc\compile.ninja
[1/70] Compile C build\msvc\obj\lua54\ldblib.obj
FAILED: build/msvc/obj/lua54/ldblib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/ldblib.c /Fobuild\msvc\obj\lua54\ldblib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[2/70] Compile C build\msvc\obj\lua54\lctype.obj
FAILED: build/msvc/obj/lua54/lctype.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lctype.c /Fobuild\msvc\obj\lua54\lctype.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[3/70] Compile C build\msvc\obj\lua54\ldebug.obj
FAILED: build/msvc/obj/lua54/ldebug.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/ldebug.c /Fobuild\msvc\obj\lua54\ldebug.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[4/70] Compile C build\msvc\obj\lua54\lcorolib.obj
FAILED: build/msvc/obj/lua54/lcorolib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lcorolib.c /Fobuild\msvc\obj\lua54\lcorolib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[5/70] Compile C build\msvc\obj\lua54\lapi.obj
FAILED: build/msvc/obj/lua54/lapi.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lapi.c /Fobuild\msvc\obj\lua54\lapi.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[6/70] Compile C build\msvc\obj\lua54\lbaselib.obj
FAILED: build/msvc/obj/lua54/lbaselib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lbaselib.c /Fobuild\msvc\obj\lua54\lbaselib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[7/70] Compile C build\msvc\obj\lua54\lfunc.obj
FAILED: build/msvc/obj/lua54/lfunc.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lfunc.c /Fobuild\msvc\obj\lua54\lfunc.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[8/70] Compile C build\msvc\obj\lua54\ldump.obj
FAILED: build/msvc/obj/lua54/ldump.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/ldump.c /Fobuild\msvc\obj\lua54\ldump.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[9/70] Compile C build\msvc\obj\lua54\lmathlib.obj
FAILED: build/msvc/obj/lua54/lmathlib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lmathlib.c /Fobuild\msvc\obj\lua54\lmathlib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[10/70] Compile C build\msvc\obj\lua54\lcode.obj
FAILED: build/msvc/obj/lua54/lcode.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lcode.c /Fobuild\msvc\obj\lua54\lcode.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[11/70] Compile C build\msvc\obj\lua54\loadlib.obj
FAILED: build/msvc/obj/lua54/loadlib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/loadlib.c /Fobuild\msvc\obj\lua54\loadlib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[12/70] Compile C build\msvc\obj\lua54\lauxlib.obj
FAILED: build/msvc/obj/lua54/lauxlib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lauxlib.c /Fobuild\msvc\obj\lua54\lauxlib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[13/70] Compile C build\msvc\obj\lua54\liolib.obj
FAILED: build/msvc/obj/lua54/liolib.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/liolib.c /Fobuild\msvc\obj\lua54\liolib.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[14/70] Compile C build\msvc\obj\lua54\llex.obj
FAILED: build/msvc/obj/lua54/llex.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/llex.c /Fobuild\msvc\obj\lua54\llex.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[15/70] Compile C build\msvc\obj\lua54\lgc.obj
FAILED: build/msvc/obj/lua54/lgc.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lgc.c /Fobuild\msvc\obj\lua54\lgc.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[16/70] Compile C build\msvc\obj\lua54\ldo.obj
FAILED: build/msvc/obj/lua54/ldo.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/ldo.c /Fobuild\msvc\obj\lua54\ldo.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[17/70] Compile C build\msvc\obj\lua54\lmem.obj
FAILED: build/msvc/obj/lua54/lmem.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/lmem.c /Fobuild\msvc\obj\lua54\lmem.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
[18/70] Compile C build\msvc\obj\lua54\linit.obj
FAILED: build/msvc/obj/lua54/linit.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/linit.c /Fobuild\msvc\obj\lua54\linit.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
ninja: build stopped: subcommand failed.
D:\Home\Learn\vscode\luamake>
vcvarsamd64_x86.bat是不需要的
下面是 cmd powershell 两种执行的结果 非常感谢你的帮忙
Microsoft Windows [版本 10.0.19043.1165]
(c) Microsoft Corporation。保留所有权利。
D:\Home\Learn\vscode\luamake>.\compile\install.bat
D:\Home\Learn\vscode\luamake>compile\install.bat
D:\Home\Learn\vscode\luamake>
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS D:\Home\Learn\vscode\luamake> compile/install.bat
D:\Home\Learn\vscode\luamake>ninja -f build\msvc\compile.ninja
[1/70] Compile C build\msvc\obj\lua54\ldump.obj
FAILED: build/msvc/obj/lua54/ldump.obj
cl /nologo /showIncludes -c 3rd/bee.lua/3rd/lua/ldump.c /Fobuild\msvc\obj\lua54\ldump.obj /EHsc /Zc:__cplusplus /permissive- /O2 /GL /Zc:inline /W3 /MD /D_WIN32_WINNT=0x0601 /DLUA_BUILD_AS_DLL /DNDEBUG
D:\Home\Learn\vscode\luamake\3rd\bee.lua\3rd\lua\utf8_crt.h(4): fatal error C1083: 无法打开包括文件: “stdio.h”: No such file or directory
我的vs都是安装默认路径上的,但是发现旧版 vs2017 和 vs2019目录结构有一点不太一样的了,也许是新版的 VS做了一些结构调整导致的,我安装的时候,都是照着教程默认点下一步下一步去安装的
vcvars32.bat vcvars64.bat vcvarsall.bat vcvarsamd64_x86.bat vcvarsx86_amd64.bat
环境所在路径: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build
cl 所在路径: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64
PS C:\Program Files (x86)\Microsoft Visual Studio\Installer> .\vswhere.exe -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
PS C:\Program Files (x86)\Microsoft Visual Studio\Installer>
PS C:\Program Files (x86)\Microsoft Visual Studio\Installer> .\vswhere.exe
Visual Studio Locator version 2.7.1+180c706d56 [query version 2.7.3111.17308]
Copyright (C) Microsoft Corporation. All rights reserved.
instanceId: ddf160e4
installDate: 2021/6/27 21:40:47
installationName: VisualStudio/15.9.36+28307.1525
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
installationVersion: 15.9.28307.1525
productId: Microsoft.VisualStudio.Product.Enterprise
productPath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.exe
state: 4294967295
isComplete: 1
isLaunchable: 1
isPrerelease: 0
isRebootRequired: 0
displayName: Visual Studio Enterprise 2017
description: 满足任何规模团队的生产效率和协调性需求的 Microsoft DevOps 解决方案
channelId: VisualStudio.15.Release
channelUri: https://aka.ms/vs/15/release/channel
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
releaseNotes: https://go.microsoft.com/fwlink/?LinkId=660692#15.9.36
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660708
updateDate: 2021-06-27T13:40:47.3560881Z
catalog_buildBranch: d15.9
catalog_buildVersion: 15.9.28307.1525
catalog_id: VisualStudio/15.9.36+28307.1525
catalog_localBuild: build-lab
catalog_manifestName: VisualStudio
catalog_manifestType: installer
catalog_productDisplayVersion: 15.9.36
catalog_productLine: Dev15
catalog_productLineVersion: 2017
catalog_productMilestone: RTW
catalog_productMilestoneIsPreRelease: False
catalog_productName: Visual Studio
catalog_productPatchVersion: 36
catalog_productPreReleaseMilestoneSuffix: 1.0
catalog_productRelease: RTW
catalog_productSemanticVersion: 15.9.36+28307.1525
catalog_requiredEngineVersion: 1.18.1063.29791
properties_campaignId: 1311216429.1605792354
properties_canceled: 0
properties_channelManifestId: VisualStudio.15.Release/15.9.36+28307.1525
properties_nickname:
properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe
instanceId: f9bebf1d
installDate: 2020/11/20 19:31:04
installationName: VisualStudio/16.10.3+31424.327
installationPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
installationVersion: 16.10.31424.327
productId: Microsoft.VisualStudio.Product.Enterprise
productPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe
state: 4294967295
isComplete: 1
isLaunchable: 1
isPrerelease: 0
isRebootRequired: 0
displayName: Visual Studio Enterprise 2019
description: 面向任何规模团队提供的可缩放、端到端解决方案
channelId: VisualStudio.16.Release
channelUri: https://aka.ms/vs/16/release/channel
enginePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service
releaseNotes: https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-v16.10#16.10.3
thirdPartyNotices: https://go.microsoft.com/fwlink/?LinkId=660909
updateDate: 2021-07-16T09:05:10.2660899Z
catalog_buildBranch: d16.10
catalog_buildVersion: 16.10.31424.327
catalog_id: VisualStudio/16.10.3+31424.327
catalog_localBuild: build-lab
catalog_manifestName: VisualStudio
catalog_manifestType: installer
catalog_productDisplayVersion: 16.10.3
catalog_productLine: Dev16
catalog_productLineVersion: 2019
catalog_productMilestone: RTW
catalog_productMilestoneIsPreRelease: False
catalog_productName: Visual Studio
catalog_productPatchVersion: 3
catalog_productPreReleaseMilestoneSuffix: 1.0
catalog_productSemanticVersion: 16.10.3+31424.327
catalog_requiredEngineVersion: 2.10.2174.31177
properties_campaignId: 1311216429.1605792354
properties_channelManifestId: VisualStudio.16.Release/16.10.3+31424.327
properties_nickname:
properties_setupEngineFilePath: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe
PS C:\Program Files (x86)\Microsoft Visual Studio\Installer>
build/msvc/compile.ninja这个文件是你自己手写的?
不是的,是自动生成的
你之前说无法生成msvc_deps_prefix,为什么现在可以了?
看看这个指令的结果是什么
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" & set
我看到如下结果以为是错的,后来我翻你的脚本去看,自己试了一下,结果就是这样的
msvc_deps_prefix = 注意: 包含文件:
subninja compile/ninja/msvc.ninja
Microsoft Windows [版本 10.0.19043.1165]
(c) Microsoft Corporation。保留所有权利。
C:\Users\admin>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" & set
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.3
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\admin\AppData\Roaming
CommandPromptType=Native
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=LAPTOP-7LFAPVDH
ComSpec=C:\Windows\system32\cmd.exe
DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\
DriverData=C:\Windows\System32\Drivers\DriverData
ExtensionSdkDir=C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs
Framework40Version=v4.0
FrameworkDir=C:\Windows\Microsoft.NET\Framework\
FrameworkDIR32=C:\Windows\Microsoft.NET\Framework\
FrameworkVersion=v4.0.30319
FrameworkVersion32=v4.0.30319
FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools
GameFirstUserPath=C:\ProgramData\ASUS\GameFirst
GameTurbo=C:\Program Files (x86)\ASUS\GameFirst\
HOMEDRIVE=C:
HOMEPATH=\Users\admin
HTMLHelpDir=C:\Program Files (x86)\HTML Help Workshop
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt
LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\lib\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x86
LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\ATLMFC\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\lib\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0;C:\Windows\Microsoft.NET\Framework\v4.0.30319
LOCALAPPDATA=C:\Users\admin\AppData\Local
LOGONSERVER=\\LAPTOP-7LFAPVDH
NETFXSDKDir=C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\
NUMBER_OF_PROCESSORS=16
OneDrive=C:\Users\admin\OneDrive
OS=Windows_NT
Path=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\bin\HostX86\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\;D:\Program Files (x86)\opencv\build\x64\vc15\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Lib\tools\PortableGit\bin;;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 96 Stepping 1, AuthenticAMD
PROCESSOR_LEVEL=23
PROCESSOR_REVISION=6001
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
QtMsBuild=C:\Users\admin\AppData\Local\QtMsBuild
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\admin\AppData\Local\Temp
TMP=C:\Users\admin\AppData\Local\Temp
UCRTVersion=10.0.22000.0
UniversalCRTSdkDir=C:\Program Files (x86)\Windows Kits\10\
USERDOMAIN=LAPTOP-7LFAPVDH
USERDOMAIN_ROAMINGPROFILE=LAPTOP-7LFAPVDH
USERNAME=admin
USERPROFILE=C:\Users\admin
VBOX_MSI_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
VCIDEInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VC\
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\
VCToolsInstallDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\
VCToolsRedistDir=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.29.30036\
VCToolsVersion=14.29.30037
VisualStudioVersion=16.0
VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
VS160COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\
VSCMD_ARG_app_plat=Desktop
VSCMD_ARG_HOST_ARCH=x86
VSCMD_ARG_TGT_ARCH=x86
VSCMD_VER=16.10.3
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
VSSDK150INSTALL=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VSSDK
VSSDKINSTALL=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VSSDK
windir=C:\Windows
WindowsLibPath=C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.19041.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.19041.0
WindowsSdkBinPath=C:\Program Files (x86)\Windows Kits\10\bin\
WindowsSdkDir=C:\Program Files (x86)\Windows Kits\10\
WindowsSDKLibVersion=10.0.19041.0\
WindowsSdkVerBinPath=C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\
WindowsSDKVersion=10.0.19041.0\
WindowsSDK_ExecutablePath_x64=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\
WindowsSDK_ExecutablePath_x86=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\
__devinit_path=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\devinit\devinit.exe
__DOTNET_ADD_32BIT=1
__DOTNET_PREFERRED_BITNESS=32
__VSCMD_PREINIT_PATH=D:\Program Files (x86)\opencv\build\x64\vc15\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Lib\tools\PortableGit\bin;
__VSCMD_script_err_count=0
C:\Users\admin>
你的include路径包含了两个版本windows sdk。我不知道这是否是一种合理的情形,不过你可以去对应的位置看看,是否是一个正确的路径
INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\ATLMFC\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30037\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt
你使用最新版本的就可以的了?是的我按装了好几个版本的,标准路径下就这两个 默认使用 14.29.30037
是windows sdk的版本,C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0和C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0
默认使用这个 10.0.19041.0 其实我还有 7.1 和 8.1 两个特殊版本
看清楚我说什么,OK?
是需要手动去设置 INCLUDE 环境变量吗?能说一下具体的操作流程吗?谢谢
PS D:\Home\WorkPro\Sandbox\code\blockmango-client\dev> cd "C:\Program Files (x86)\Windows Kits\10\Include"
PS C:\Program Files (x86)\Windows Kits\10\Include> ls
目录: C:\Program Files (x86)\Windows Kits\10\Include
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/6/26 20:02 10.0.10240.0
d----- 2021/6/28 17:18 10.0.14393.0
d----- 2021/6/28 17:17 10.0.17763.0
d----- 2020/11/20 19:38 10.0.18362.0
d----- 2021/6/25 13:31 10.0.19041.0
d----- 2021/7/16 19:52 10.0.22000.0
d----- 2021/7/16 19:52 wdf
PS C:\Program Files (x86)\Windows Kits\10\Include>
看看C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt这个目录是否存在
这个目录不存在的,问题应该就是出在这的了,到这一步,我应该怎么操作?
PS C:\Program Files (x86)\Windows Kits\10\Include> cd .\10.0.22000.0\
PS C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0> ls
目录: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/7/16 19:52 km
d----- 2021/7/16 19:53 shared
d----- 2021/7/16 19:53 um
PS C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0> cd ..\10.0.19041.0\
PS C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0> ls
目录: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/6/25 13:31 cppwinrt
d----- 2021/6/25 13:31 shared
d----- 2021/6/25 13:30 ucrt
d----- 2021/6/25 13:31 um
d----- 2021/6/25 13:31 winrt
PS C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0>
谢谢你的帮忙了,发现是我原来安装了 wdk 才导致这样的,我删除wdk后就正常的了 bootstrap.exe 应该就是 luamake.exe?
ninja msvc_deps_prefix 配置好后,配置报找不到头文件,应该是我的系统原因,可能是设置不了英文导致 因为我想编译你的 lua-debug 插件学习一下,发现需要使用到 luamake 因为ninja 编译不了,所以我翻译了ninja 的工程文件 下面是我用 xmake 工具写的 最后段 luamake 生成的看不懂的,luamake 又找不到二进制的包下载,不知道能否提供一个二进制的下载包不?