Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Compiling CGAL with clang++ -std=c++11

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Compiling CGAL with clang++ -std=c++11


Chronological Thread 
  • From: Philipp Moeller <>
  • To: jdumas <>
  • Cc:
  • Subject: Re: [cgal-discuss] Re: Compiling CGAL with clang++ -std=c++11
  • Date: Fri, 26 Apr 2013 13:50:43 +0200
  • Organization: GeometryFactory

jdumas
<>
writes:

> Philipp Moeller-2 wrote
>> Can you pick one example file and post the error message as well? Please
>> be aware that clang support on Linux isn't complete. Are you using the
>> gcc stdlib or libc++ from clang?
>
> I don't know, I'm just using the CMakeLists.txt shipped with CGAL, where
> I've added the definition -std=c++11. How can I tell which lib is used
> during the compilation?

You can check the value of the macro _LIBCPP_VERSION. To set the library
manually use the -stdlib option.

>
> As for the version thing yes I've built clang from the svn trunk (I don't
> know where to get the sources for the latest stable release by another
> mean). clang -v outputs 'clang version 3.3 (179753)'
>
> The examples under examples/Linear_cell_complex are the first not to
> compile. examples/Polytope_distance_d also halts, but due to what seems a
> bug in clang. The error log is a bit verbose, and I'v pasted it here:
> http://pastebin.com/wmSqpZBX

From your errors it seems that you are using the library shipped with
gcc. Also notice that you still end up with boost::tuple instead of
std::tuple, even though C++11 is enabled. The reason for this is: clang
masquerades as a rather old gcc (4.2 if I remember correctly) and
gcc/libstdc++ aren't versioned separately. So even if you have a new gcc
release, using it with clang will not enable all C++11 code in the
library.

I recommend getting libc++ [1] to go along with clang. You probably will
need to build it from trunk as well, I'm not sure if Ubuntu can package
directly from a CVS.

>
>
> But I think you should be able to reproduce it with ease.

Footnotes:
[1] http://libcxx.llvm.org/



Archive powered by MHonArc 2.6.18.

Top of Page