I decided to test clang in my project. There is CMake build system so, I run such command:
cmake ../ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
MAKE_C_COMPILER= clang
CMAKE_CXX_COMPILER= clang++
-- The C compiler identification is Clang
-- The CXX compiler identification is Clang
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
But building has been failed:
Here is first line of make VERBOSE=1
clang++ -DApplicationManager_EXPORTS -g -fPIC -Iinclude -I/usr/include/python2.7 -I/usr/include/ClanLib-2.2 -I/usr/include/Box2D -Wall -g -msse2 -fPIC -o CMakeFiles/ApplicationManage开发者_StackOverflow中文版r.cpp.o -c ApplicationManager.cpp
And list of errors http://pastebin.com/MQmhbW4D.
Here is also screenshot of console: http://img689.imageshack.us/img689/5347/clang.png
Clang has not implemented __is_trivial
, so it seems like you're out of luck for now.
Link to bug report
The clang project recommends using libstdc++ from GCC 4.5 or earlier. See the Clang C++ Status page if you're interested in using C++'0x with the GCC 4.4 libstdc++.
-Chris
精彩评论