Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re:error compiling algebraic_curves example

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re:error compiling algebraic_curves example


Chronological Thread 
  • From:
  • To:
  • Subject: [cgal-discuss] Re:error compiling algebraic_curves example
  • Date: Tue, 1 Mar 2011 14:55:32 +0100 (MET)
  • Importance: Normal

Hi,
thank you for your reply.
Where I have to set the compiler option -std=c99 you suggest?
thanks again


Hi,

I'm running on Mac OS X 10.6.5 Intel Core 2 Duo (64-bit) and I'm compiling
with g++ 4.2.1. Boost has been downloaded following the link provided in
the CGAL installation manual and the version is 1.40.0.
I'm also attaching the hw_rounding.hpp lines.
Thanks


#ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
#define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
#include <boost/numeric/interval/rounding.hpp>
#include <boost/numeric/interval/rounded_arith.hpp>

#define BOOST_NUMERIC_INTERVAL_NO_HARDWARE

// define appropriate specialization of rounding_control for built-in types
#if defined(__x86_64__) && defined(__USE_ISOC99)
# include <boost/numeric/interval/detail/c99_rounding_control.hpp>

looking at the conditions of this include it seems that __USE_ISOC99 is not
defined. Can you try the compiler option -std=c99 ?

Joachim

#elif defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__) ||
defined(_M_X64
)
# include <boost/numeric/interval/detail/x86_rounding_control.hpp>
#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
# include <boost/numeric/interval/detail/ppc_rounding_control.hpp>#elif
defined(sparc) || defined(__sparc__)
# include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
#elif defined(alpha) || defined(__alpha__)
# include <boost/numeric/interval/detail/alpha_rounding_control.hpp>
#elif defined(ia64) || defined(__ia64) || defined(__ia64__)
# include <boost/numeric/interval/detail/ia64_rounding_control.hpp>
#endif

#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && (defined(__USE_ISOC99)
|| defined(_
_MSL__))
# include <boost/numeric/interval/detail/c99_rounding_control.hpp>
#endif

#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE)
# undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
# error Boost.Numeric.Interval: Please specify rounding control mechanism.
#endif

namespace boost {
namespace numeric {
namespace interval_lib {

/*
* Three specializations of rounded_math<T>
*/

template<>
struct rounded_math<float>
: save_state<rounded_arith_opp<float> >
{};

template<>
struct rounded_math<double>
: save_state<rounded_arith_opp<double> >
{};

template<>
struct rounded_math<long double>
: save_state<rounded_arith_opp<long double> >
{};

} // namespace interval_lib
} // namespace numeric
} // namespace boost

#endif // BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP






Hi,

On 02/22/2011 05:57 PM,

wrote:
Conversely if I compile the examples I have the following error for
"algebraic_curves":

In file included from /usr/local/include/boost/numeric/interval.hpp:18,
from
/CGAL3.7/examples/Arrangement_on_surface_2/../../include/CGAL/Algebraic_kernel_d/Interval_evaluate_1.h:30,
from
/CGAL3.7/examples/Arrangement_on_surface_2/../../include/CGAL/Algebraic_kernel_d_1.h:41,
from
/CGAL-3.7/examples/Arrangement_on_surface_2/../../include/CGAL/Arr_algebraic_segment_traits_2.h:25,
from
/CGAL-3.7/examples/Arrangement_on_surface_2/algebraic_curves.cpp:14:
/usr/local/include/boost/numeric/interval/hw_rounding.hpp:40:4: error:
#error Boost.Numeric.Interval: Please specify rounding control mechanism.
make[3]: ***
[examples/Arrangement_on_surface_2/CMakeFiles/algebraic_curves.dir/algebraic_curves.o]
Error 1
make[2]: ***
[examples/Arrangement_on_surface_2/CMakeFiles/algebraic_curves.dir/all]
Error 2
make[1]: *** [CMakeFiles/examples.dir/rule] Error 2
make: *** [examples] Error 2
Any suggestions?
Thank you in advance!

it would be nice if you would include some important information, like which
linux distribution you are using, 32 or 64bit, compiler and version, Boost
version. And please attach the first ~45 lines of
/usr/local/include/boost/numeric/interval/hw_rounding.hpp.

Joachim




--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss





Archive powered by MHonArc 2.6.16.

Top of Page