在windows下编译irony-server.exe 总失败,我用的是visual studio , 说是找不到clang-c/Index.h …我在想:能不能把别人编译好的irony-server.exe拿来用?自己编译实在搞不定 我编译的输出结果是(我已经加粗了提示失败的地方):
c:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build>cmake -DLIBCLANG_LIBRARY=c:\tools\LLVM\lib\libclang.lib -DLIBCLANG_INCLUDE_DIR=c:\tools\LLVM\lib -G “Visual Studio 14 2015 Win64” … – Selecting Windows SDK version to target Windows 10.0.16299. – The C compiler identification is MSVC 19.0.24210.0 – The CXX compiler identification is MSVC 19.0.24210.0 – Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – works – Detecting C compiler ABI info – Detecting C compiler ABI info - done – Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe – works – Detecting CXX compiler ABI info – Detecting CXX compiler ABI info - done – Detecting CXX compile features – Detecting CXX compile features - done – Found LibClang: C:/tools/LLVM/lib/libclang.lib – Detecting Clang resource directory – Detecting Clang resource directory – fail CMake Warning at cmake/CheckClangResourceDir.cmake:77 (message): CheckClangResourceDir: failed to compile checker, please report.
Compile output: Change Dir: C:/Users/cliyh/AppData/Roaming/.emacs.d/elpa/irony-20180104.1109/server/build/CMakeFiles/CMakeTmp
Run Build Command:“C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe” “cmTC_e8b70.vcxproj” “/p:Configuration=Debug” “/p:VisualStudioVersion=14.0”
Microsoft ® Build Engine version 14.0.25420.1
Copyright © Microsoft Corporation. All rights reserved.
Build started 1/25/2018 12:00:28 AM.
Project “C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj” on node 1 (default targets).
PrepareForBuild:
Creating directory “cmTC_e8b70.dir\Debug”. Creating directory “C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\Debug”. Creating directory “cmTC_e8b70.dir\Debug\cmTC_e8b70.tlog”.
InitializeBuildStatus:
Creating “cmTC_e8b70.dir\Debug\cmTC_e8b70.tlog\unsuccessfulbuild” because “AlwaysCreate” was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /IC:\tools\LLVM\lib /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D “CMAKE_INTDIR=“Debug”” /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_e8b70.dir\Debug" /Fd"cmTC_e8b70.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue /EHs-c- “C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\LibClangDiagnosticsChecker.cpp” Microsoft ® C/C++ Optimizing Compiler Version 19.00.24210 for x64 Copyright © Microsoft Corporation. All rights reserved.
LibClangDiagnosticsChecker.cpp cl /c /IC:\tools\LLVM\lib /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D “CMAKE_INTDIR=“Debug”” /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_e8b70.dir\Debug" /Fd"cmTC_e8b70.dir\Debug\vc140.pdb" /Gd /TP /errorReport:queue /EHs-c- “C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\LibClangDiagnosticsChecker.cpp”
cl : Command line warning D9025: overriding ‘/EHs’ with ‘/EHs-’ [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
cl : Command line warning D9025: overriding ‘/EHc’ with ‘/EHc-’ [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\LibClangDiagnosticsChecker.cpp(9): fatal error C1083: Cannot open include file: ‘clang-c/Index.h’: No such file or directory [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
Done Building Project “C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj” (default targets) – FAILED.
Build FAILED.
“C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj” (default target) (1) ->
(ClCompile target) ->
cl : Command line warning D9025: overriding ‘/EHs’ with ‘/EHs-’ [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj] cl : Command line warning D9025: overriding ‘/EHc’ with ‘/EHc-’ [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
“C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj” (default target) (1) ->
(ClCompile target) ->
C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\LibClangDiagnosticsChecker.cpp(9): fatal error C1083: Cannot open include file: ‘clang-c/Index.h’: No such file or directory [C:\Users\cliyh\AppData\Roaming.emacs.d\elpa\irony-20180104.1109\server\build\CMakeFiles\CMakeTmp\cmTC_e8b70.vcxproj]
2 Warning(s) 1 Error(s)
Time Elapsed 00:00:00.85
Call Stack (most recent call first): src/CMakeLists.txt:8 (check_clang_resource_dir)
– Irony package version is ‘1.2.0’ – Found emacs: C:/Emacs64/bin/emacs.exe – Configuring done – Generating done – Build files have been written to: C:/Users/cliyh/AppData/Roaming/.emacs.d/elpa/irony-20180104.1109/server/build