?

Log in

No account? Create an account
fedora 蓝色小药丸

LLVM/clang first time use


Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\byuan>clang -c test.c -o test.exe
test.c:1:10: fatal error: 'stdio.h' file not found
#include
[Error: Irreparable invalid markup ('<stdio.h>') in entry. Owner must fix manually. Raw contents below.]

<lj-cut>
<code>Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.&nbsp; All rights reserved.

C:\Users\byuan&gt;clang -c test.c -o test.exe
test.c:1:10: fatal error: &#39;stdio.h&#39; file not found
#include <stdio.h>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^
1 error generated.

C:\Users\byuan&gt;clang -c test.c -v
clang version 3.7.0 (trunk)
Target: i686-pc-windows-gnu
Thread model: posix
&nbsp;&quot;C:\\cygwin\\Opt\\LLVM\\bin\\clang.exe&quot; -cc1 -triple i686-pc-windows-gnu -emit-
obj -mrelax-all -disable-free -main-file-name test.c -mrelocation-model static -
mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-a
liases -target-cpu pentium4 -v -dwarf-column-info -fno-unique-section-names -cov
erage-file &quot;C:\\Users\\byuan\\test.c&quot; -resource-dir &quot;C:\\cygwin\\Opt\\LLVM\\bin\
\..\\lib\\clang\\3.7.0&quot; -fdebug-compilation-dir &quot;C:\\Users\\byuan&quot; -ferror-limit
&nbsp;19 -fmessage-length 80 -mstackrealign -fno-use-cxa-atexit -fobjc-runtime=gcc -f
diagnostics-show-option -fcolor-diagnostics -o test.o -x c test.c
clang -cc1 version 3.7.0 based upon LLVM 3.7.0-r236435 default target i686-pc-wi
ndows-gnu
ignoring nonexistent directory &quot;/usr/local/include&quot;
ignoring nonexistent directory &quot;C:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\../../
../i686-w64-mingw32/include&quot;
ignoring nonexistent directory &quot;C:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\../../
../x86_64-w64-mingw32/include&quot;
ignoring nonexistent directory &quot;/mingw/include&quot;
ignoring nonexistent directory &quot;c:/mingw/include&quot;
ignoring nonexistent directory &quot;/usr/include&quot;
#include &quot;...&quot; search starts here:
#include &lt;...&gt; search starts here:
&nbsp;C:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\include
&nbsp;C:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\../../../include
End of search list.
test.c:1:10: fatal error: &#39;stdio.h&#39; file not found
#include <stdio.h>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^
1 error generated.

C:\Users\byuan&gt;ls c:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\../../../include
&#39;ls&#39; is not recognized as an internal or external command,
operable program or batch file.

C:\Users\byuan&gt;dir c:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\../../../include
Invalid switch - &quot;..&quot;.

C:\Users\byuan&gt;dir c:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\..\../../include
Invalid switch - &quot;..&quot;.

C:\Users\byuan&gt;dir c:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\..\..\../include
Invalid switch - &quot;include&quot;.

C:\Users\byuan&gt;dir c:\cygwin\Opt\LLVM\bin\..\lib\clang\3.7.0\..\..\..\include
&nbsp;Volume in drive C has no label.
&nbsp;Volume Serial Number is EC23-7720

&nbsp;Directory of c:\cygwin\Opt\LLVM\include

05/11/2015&nbsp; 10:53 AM&nbsp;&nbsp;&nbsp;
<dir>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .
05/11/2015&nbsp; 10:53 AM&nbsp;&nbsp;&nbsp;
</dir>
<dir>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ..
05/11/2015&nbsp; 10:53 AM&nbsp;&nbsp;&nbsp;
</dir>
<dir>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clang-c
05/11/2015&nbsp; 10:53 AM&nbsp;&nbsp;&nbsp;
</dir>
<dir>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; llvm-c
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 File(s)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 bytes
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 Dir(s)&nbsp; 74,285,015,040 bytes free

C:\Users\byuan&gt;
</dir>
</stdio.h></stdio.h></code></lj-cut>

回家在 Fedora Linux 上设置 YouCompleteMe,果然还是一样,一开始只能提示有限的几个词。安装起来容易多了,可是似乎每次都耗时很久,去下载一份 clang &amp; boost??

工具提示的正确代码,实际却不能编译,因为版本之类的问题,这种感觉真是奇妙。尼玛都编译过了,还要搞 build 系统干嘛,直接打包发布编辑器的临时文件得了。直接发布编辑器得了。

今天安装了 CLion,打开一个项目后花了半个小时 update symbols。这个也和 R# 一样了,慢得很。

可是工具是用来做什么的呢。
Tags:

Comments