Visual c++ CMake未能;查找“;visualc&x2B+;编译程序 我试图用CGube和VisualStudio 2015社区在AtLasyBrin上构建一个C++项目测试套件。在我的用户帐户下运行时,CMake和VS工作正常,但通过Bambol运行时,我得到以下错误: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found.
我不认为我会因为通常的原因而犯这个错误。CMake似乎能够找到编译器本身。相反,资源编译器似乎是错误的根源。在Visual c++ CMake未能;查找“;visualc&x2B+;编译程序 我试图用CGube和VisualStudio 2015社区在AtLasyBrin上构建一个C++项目测试套件。在我的用户帐户下运行时,CMake和VS工作正常,但通过Bambol运行时,我得到以下错误: -- The C compiler identification is unknown -- The CXX compiler identification is unknown CMake Error at CMakeLists.txt:3 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:3 (project): No CMAKE_CXX_COMPILER could be found.,visual-c++,cmake,bamboo,Visual C++,Cmake,Bamboo,我不认为我会因为通常的原因而犯这个错误。CMake似乎能够找到编译器本身。相反,资源编译器似乎是错误的根源。在CMakeFiles/CMakeError.log文件中,我有以下输出: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe <<options removed> CMakeCCompilerId.c C:\Windows\system32\config\systemprofile\A
CMakeFiles/CMakeError.log
文件中,我有以下输出:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe
<<options removed> CMakeCCompilerId.c
C:\Windows\system32\config\systemprofile\AppData\Local\Temp\lnk{ECA1FDDF-C2EA-4
819-AFE3-6A5E06ECA59E}.tmp(1): error RC2135: file not found: C:\Windows\system3
2\config\systemprofile\AppData\Local\Temp\lnk{8A24DD6C-9300-41A6-9CAC-B48137E0E
056}.tmp [C:\bamboo\bamboo-agent-home\...\CMakeFiles\3.6.1\CompilerIdC\CompilerIdC.vcxproj]
C:\ProgramFiles(x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe
我有这个问题;这是在Windows下将远程代理作为服务安装,并在本地用户帐户(而不是系统帐户)下运行的结果
问题似乎是TEMP和TMP环境变量设置为c:\windows\system32\config\systemprofile,这适用于系统帐户,但不适用于本地用户帐户。它无法访问它们,所以cmake摔倒了
一种解决方法是编辑$bambon\u AGENT\u HOME\conf\wrapper.conf并添加行
set.TEMP=c:/some/path
set.TMP=c:/some/path
以及通过添加以下内容来设置java的tmpdir:
wrapper.java.additional.#=-Djava.io.tmpdir="C:/some/path"
其中“#”是wrapper.java.additional values序列中的下一个数字。您是否在命令提示符下或在执行vcvars批处理文件时加载了visual studio变量?这应该被接受为一个答案。set.TMP和set.TEMP是必需的,最后为我修复了这个错误。