gri*_*sha 8 c++ windows llvm cling
是否可以在Windows上运行cling?
我使用Visual C++ 12.0 从源代码(构建指令)成功编译了cling ,但是当我尝试运行时,我遇到以下运行时错误:
F:\Dev\open-source\Cling\src\build\Debug\bin>cling.exe
ERROR in cling::CIFactory::createCI():
resource directory F:\Dev\open-source\Cling\src\build\Debug\lib\clang\3.6.0 not found!
Assertion failed: !CurTokenLexer && "Cannot #include a file inside a macro!", file ..\..\..\..\..\tools\clang\lib\Lex\PPLexerChange.cpp, line 73
Run Code Online (Sandbox Code Playgroud)
我google了下一个链接:
顺便说一句,我有Clang(Clang版本3.6.0(主干)),一切正常.
当我运行时cling -x c,我仍然有相同的错误,但没有断言(-x意味着将后续输入文件视为类型<language>):
F:\Dev\open-source\Cling\src\build\Debug\bin>cling -x c
ERROR in cling::CIFactory::createCI():
resource directory F:\Dev\open-source\Cling\src\build\Debug\lib\clang\3.6.0 not found!
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ #include <stdio.h>
[cling]$ printf("%s", "test");
test
[cling]$
Run Code Online (Sandbox Code Playgroud)
从这个链接:
对Windows的依赖限制来自clang不支持完全窗口修改方案的事实,即它不是二进制兼容的.例如,一个人不能调用用clang/gcc编译器以外编译的函数. - 最近在铿锵一侧朝着这个方向取得了很多进展.我们应该调查为什么要坚持下去.即在操作系统是Windows的情况下,在CIFactory中正确设置的所有内容. - 由于C在C模式下没有修复,因此必须在Windows上工作(即cling -xc)
...... 这是一个我们打算尽快解决的问题,非常欢迎补丁.