<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
I'm using Mac OS X 10.6 and I'm trying to compile a program using
Clang 3.1 and libc++ but one of include files of libc++ is giving
problems, specifically one called "cmath"
<meta charset="utf-8">
located in /usr/include/c++/v1/. I have searched about this on
google and I red something about building libc++ with
-U__STRICT_ANSI__ param but the same errors appear. I paste here
the output:<br>
<blockquote>$ make<br>
[100%] Building CXX object CMakeFiles/foo.dir/foo.cpp.o<br>
In file included from /Users/xxxxx/fantom/bin/foo/foo.cpp:1:<br>
In file included from
/Users/xxxxx/fantom/include/fantom/algorithm.hpp:10:<br>
In file included from /usr/include/c++/v1/unordered_map:318:<br>
In file included from /usr/include/c++/v1/__hash_table:19:<br>
/usr/include/c++/v1/cmath:1333:9: error: no member named 'llrint'
in the global namespace<br>
using ::llrint;<br>
~~^<br>
/usr/include/c++/v1/cmath:1334:9: error: no member named 'llrintf'
in the global namespace<br>
using ::llrintf;<br>
~~^<br>
/usr/include/c++/v1/cmath:1336:86: error: use of undeclared
identifier 'llrintf'<br>
inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __x)
_NOEXCEPT {return llrintf(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1337:86: error: use of undeclared
identifier 'llrintl'<br>
inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __x)
_NOEXCEPT {return llrintl(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1342:35: error: call to 'llrint' is
ambiguous<br>
llrint(_A1 __x) _NOEXCEPT {return llrint((double)__x);}<br>
^~~~~~<br>
/usr/include/c++/v1/cmath:1336:44: note: candidate function<br>
inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __x)
_NOEXCEPT {return llrintf(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1337:44: note: candidate function<br>
inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __x)
_NOEXCEPT {return llrintl(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1346:9: error: no member named 'llround'
in the global namespace<br>
using ::llround;<br>
~~^<br>
/usr/include/c++/v1/cmath:1347:9: error: no member named
'llroundf' in the global namespace<br>
using ::llroundf;<br>
~~^<br>
/usr/include/c++/v1/cmath:1349:87: error: use of undeclared
identifier 'llroundf'<br>
inline _LIBCPP_INLINE_VISIBILITY long long llround(float __x)
_NOEXCEPT {return llroundf(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1350:87: error: use of undeclared
identifier 'llroundl'<br>
inline _LIBCPP_INLINE_VISIBILITY long long llround(long double
__x) _NOEXCEPT {return llroundl(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1355:36: error: call to 'llround' is
ambiguous<br>
llround(_A1 __x) _NOEXCEPT {return llround((double)__x);}<br>
^~~~~~~<br>
/usr/include/c++/v1/cmath:1349:44: note: candidate function<br>
inline _LIBCPP_INLINE_VISIBILITY long long llround(float __x)
_NOEXCEPT {return llroundf(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1350:44: note: candidate function<br>
inline _LIBCPP_INLINE_VISIBILITY long long llround(long double
__x) _NOEXCEPT {return llroundl(__x);}<br>
^<br>
/usr/include/c++/v1/cmath:1649:9: error: no member named 'llrintl'
in the global namespace<br>
using ::llrintl;<br>
~~^<br>
/usr/include/c++/v1/cmath:1650:9: error: no member named
'llroundl' in the global namespace<br>
using ::llroundl;<br>
~~^<br>
12 errors generated.<br>
make[2]: *** [CMakeFiles/foo.dir/foo.cpp.o] Error 1<br>
make[1]: *** [CMakeFiles/foo.dir/all] Error 2<br>
make: *** [all] Error 2<br>
</blockquote>
I have built libc++ without any problem and all paths are correct,
the only thing is that the testing application "testit" is doing the
tests using the Clang version that came with XCode (which is not
compatible with Mac OSX 10.6) instead of the one that I installed
with Macports. Is there any way to define a specific compiler to do
the tests?<br>
<br>
Thank you,<br>
<br>
Pere Joan<br>
</body>
</html>