程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> C語言 >> C++ >> C++入門知識 >> clang++ cannot compile even a hello world program in Fedora

clang++ cannot compile even a hello world program in Fedora

編輯:C++入門知識

你們都說clang好,於是我就十分想試一試。我手上的機器只有fedora 17、CentOS 4/5/6。CentOS的repositories裡面沒有clang。但是fedora 17裡面有,於是我就興致勃勃的裝了一個。結果發現,連最簡單的Hello World都編譯不過去。   [changming@test 1]$ clang++ hello.cpp  In file included from hello.cpp:1:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/iostream:39:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ostream:39:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ios:42:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/ios_base.h:40:  /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:48:45: error: use of undeclared        identifier ‘__ATOMIC_ACQ_REL’    { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }                                              ^  /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:52:38: error: use of undeclared        identifier ‘__ATOMIC_ACQ_REL’    { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }                                       ^  2 errors generated.  [changming@test14 1]$ clang hello.cpp  In file included from hello.cpp:1:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/iostream:39:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ostream:39:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ios:42:  In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/bits/ios_base.h:40:  /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:48:45: error: use of undeclared        identifier ‘__ATOMIC_ACQ_REL’    { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }                                              ^  /usr/bin/../lib/gcc/x86_64-redhat-linux/4.7.2/../../../../include/c++/4.7.2/ext/atomicity.h:52:38: error: use of undeclared        identifier ‘__ATOMIC_ACQ_REL’    { __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved