Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: How to correct these conflicts between CGAL with MSVC8

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: How to correct these conflicts between CGAL with MSVC8


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: How to correct these conflicts between CGAL with MSVC8
  • Date: Sat, 5 Jun 2010 11:40:24 +0200
  • Organization: GeometryFactory

Le samedi 05 juin 2010 07:33:37, JohnHans a écrit :
> Hi,
>
> Now I have built the latest CGAL 3.6 based on Qt4.5.3 and Boost 1.41.
> However, which include file is about identifier lroundf, round?
> And I also cannot find the include file: 'unistd.h'.
>
> Thank you very much!

lroundf is standardized in C99 in <math.h>, but it is not in C++98. It will
be
in the future norm C++0x in <cmath>.

As your compiler does not have it for the moment, you could write your own
version: that is what you were doing with MathFix.h. But you incorrectly used
macros conflicting with other header files. You can also use a cross-platform
implementation of that. There is one in Boost.Math: there is one template
version lround<T>, and another one implementing really functions of C++ TR1
and C++0x, with lroundf among them.

http://www.boost.org/doc/libs/1_43_0/libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/tr1.html
http://www.boost.org/doc/libs/1_43_0/libs/math/doc/sf_and_dist/html/math_toolkit/utils/rounding/round.html

If you want to use the Boos.Math functions, please read the manual carefully:
be sure to link with the right Boost libraries if you use Boost.Math
implementation of TR1, and be careful of the namespaces that contains the
identifiers you want to use.

--
Laurent Rineau, PhD
Release Manager of the CGAL Project http://www.cgal.org/
R&D Engineer at GeometryFactory http://www.geometryfactory.com/



Archive powered by MHonArc 2.6.16.

Top of Page