Replies: 15 comments 4 replies
-
可能你的vs没装完整,c++ sdk装了么 你可以打开 vs prompt cmd 然后执行下 cl.exe 看看能否找到 如果找不到,说明没装完整 |
Beta Was this translation helpful? Give feedback.
-
我确实没装c++,但我刚在Visual Studio Installer中安装了"使用 C++ 的桌面开发" ,但还是会报这个错,此外我好像没有 vs prompt cmd,我在cmd里输入cl.exe是没反应的 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
查看详细信息如下: checking for cl.exe ... no checking for cl.exe ... no 7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21 Scanning the drive for archives: Extracting archive: eigen-3.4.0.tar.bz2Path = eigen-3.4.0.tar.bz2 Everything is Ok Size: 16916480 7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21 Scanning the drive for archives: Extracting archive: C:\Users\huosy\AppData\Local\Temp.xmake\230529_3591FA26B1ED48608730A56AF52271D0.tar\eigen-3.4.0.tarPath = C:\Users\huosy\AppData\Local\Temp.xmake\230529_3591FA26B1ED48608730A56AF52271D0.tar\eigen-3.4.0.tar Everything is Ok Folders: 137 => install eigen 3.4.0 .. failed stack traceback: |
Beta Was this translation helpful? Give feedback.
-
执行下面再试试
|
Beta Was this translation helpful? Give feedback.
-
谢谢,貌似已经取得了很大的进步,已经可以找到vs,不过还是有一些其它报错,麻烦您再看一下 cl: 命令行 warning D9002 :忽略未知选项“-std:c++11” |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
你先搞个没有包的空工程试下,std 能否找到 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
D:\Tets\Test>xmake l detect.sdks.find_vstudio |
Beta Was this translation helpful? Give feedback.
-
vcvarsall.bat 里面没返回 iostream 所在 include 路径。 |
Beta Was this translation helpful? Give feedback.
-
@if not "%VSCMD_DEBUG%" GEQ "3" echo off @Rem ------------------------------------------------------------------------- @Rem Parse command line arguments. This implementation does not care about if "%VSCMD_DEBUG%" GEQ "1" ( set __VCVARSALL_PARSE_ERROR=0 if "%VSCMD_DEBUG%" GEQ "1" ( if "%__VCVARSALL_CLEAN_ENV%" NEQ "" goto :call_vsdevcmd @Rem ------------------------------------------------------------------------- @Rem Assemble the arguments to pass to vsdevcmd.bat set "__VCVARSALL_VSDEVCMD_ARGS=-arch=%__VCVARSALL_TARGET_ARCH% -host_arch=%__VCVARSALL_HOST_ARCH%" goto :call_vsdevcmd @Rem ------------------------------------------------------------------------- :call_vsdevcmd @Rem This temporary environment variable is used to control setting of VC++ @Rem Special handling for the /clean_env argument call "%~dp0......\Common7\Tools\vsdevcmd.bat" %__VCVARSALL_VSDEVCMD_ARGS% if "%ERRORLEVEL%"=="0" ( :parse_loop exit /B 0 :parse_argument @Rem called by :parse_loop and expects the arguments to either be: set __local_ARG_FOUND= @Rem -- /clean_env -- @Rem Windows SDK Version set __temp1=%1 @Rem Store/UWP if "%__local_ARG_FOUND%" NEQ "1" ( :usage_error :usage :missing :end |
Beta Was this translation helpful? Give feedback.
-
终于解决了,原因是设置VSINSTALLDIR环境变量最后没加\,所以没找到对应的目录,踩坑记录。谢谢大佬的帮助。 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
输入xmake -vD结果:
checking for platform ... windows
checking for architecture ... x64
checking for vswhere.exe ... C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe
checking for Microsoft Visual Studio (x64) version ... no
checkinfo: cannot runv(clang.exe --version), No such file or directory
checking for clang ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... D:\Games101\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
checking for cmake ... no
checking for cmake ... no
checking for cmake ... no
checking for cmake ... D:\Games101\Cmake\bin\cmake
finding eigen from xmake ..
checking for xmake::eigen ... no
finding eigen from vcpkg ..
finding eigen from conan ..
finding eigen from pkgconfig ..
checkinfo: cannot runv(pkg-config.exe --version), No such file or directory
checking for pkg-config ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
finding eigen from system ..
checking for eigen ... no
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> eigen 3.4.0
please input: y (y/n/m)
y
checking for ping ... ok
pinging for the host(gitlab.com) ... 47 ms
D:\Games101\xmake\winenv\bin\7z x -y eigen-3.4.0.tar.bz2 -oC:\Users\huosy\AppData\Local\Temp.xmake\230527_4D7BB2ECB7DE4B50890A4639C11EFEC0.tar
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 2143091 bytes (2093 KiB)
Extracting archive: eigen-3.4.0.tar.bz2
Path = eigen-3.4.0.tar.bz2
Type = bzip2
Everything is Ok
Size: 16916480
Compressed: 2143091
D:\Games101\xmake\winenv\bin\7z x -y C:\Users\huosy\AppData\Local\Temp.xmake\230527_4D7BB2ECB7DE4B50890A4639C11EFEC0.tar\eigen-3.4.0.tar -osource.tmp
7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21
Scanning the drive for archives:
1 file, 16916480 bytes (17 MiB)
Extracting archive: C:\Users\huosy\AppData\Local\Temp.xmake\230527_4D7BB2ECB7DE4B50890A4639C11EFEC0.tar\eigen-3.4.0.tar
Path = C:\Users\huosy\AppData\Local\Temp.xmake\230527_4D7BB2ECB7DE4B50890A4639C11EFEC0.tar\eigen-3.4.0.tar
Type = tar
Physical Size = 16916480
Headers Size = 986112
Code Page = UTF-8
Everything is Ok
Folders: 137
Files: 1785
Size: 15452231
Compressed: 16916480
error: @programdir\modules\package\tools\cmake.lua:621: Unknown Visual Studio version: 'nil' set in project.
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:913]: in function 'raiselevel'
[@programdir\core\sandbox\modules\utils.lua:149]: in function 'assert'
[@programdir\modules\package\tools\cmake.lua:621]: in function '_get_cmake_generator_for_msvc'
[@programdir\modules\package\tools\cmake.lua:653]: in function '_get_configs_for_generator'
[@programdir\modules\package\tools\cmake.lua:686]: in function '_get_configs'
[@programdir\modules\package\tools\cmake.lua:979]: in function 'install'
[...xmake\repositories\xmake-repo\packages\e\eigen\xmake.lua:28]: in function 'script'
[...dir\modules\private\action\require\impl\utils\filter.lua:125]: in function 'call'
[...\modules\private\action\require\impl\actions\install.lua:364]:
=> install eigen 3.4.0 .. failed
error: @programdir\modules\private\async\runjobs.lua:256: ...\modules\private\action\require\impl\actions\install.lua:469: install failed!
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:913]:
[...\modules\private\action\require\impl\actions\install.lua:469]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
[...\modules\private\action\require\impl\actions\install.lua:328]:
[...modules\private\action\require\impl\install_packages.lua:479]: in function 'jobfunc'
[@programdir\modules\private\async\runjobs.lua:232]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:913: in function 'os.raiselevel'
(...tail calls...)
@programdir\modules\private\async\runjobs.lua:256: in field 'catch'
@programdir\core\sandbox\modules\try.lua:123: in global 'try'
@programdir\modules\private\async\runjobs.lua:218: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:404: in function <@programdir\core\base\scheduler.lua:397>
执行执行下 xmake l detect.sdks.find_vstudio结果为
{
}
我怀疑是不是因为我的vs不是装在默认路径下造成的,不知道要怎么修改
Beta Was this translation helpful? Give feedback.
All reactions