Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] MinGW 64 Compilation error

Subject: CGAL users discussion list

List archive

[cgal-discuss] MinGW 64 Compilation error


Chronological Thread 
  • From: Vincent Rouvreau <>
  • To:
  • Subject: [cgal-discuss] MinGW 64 Compilation error
  • Date: Mon, 26 Jan 2015 17:22:34 +0100 (CET)

Hello,

I was trying to compile pieces of CGAL code under windows 7 with MinGW 64 to
build a R package with alpha_shapes_3 computation.
I am compiling with undefined GMP, MPFR, GMPXX, ... (please refer to my
compiler_config.h file).

I have the following error:
./CGAL/double.h:132:10: error: 'CGAL_ALIGN_16' does not name a type

because in config.h (_M_X64 is defined with MinGW64):
#if (_M_IX86_FP >= 2) || defined(_M_X64)
#define CGAL_USE_SSE2_FABS
#endif

but in sse2.h:
#if defined ( _MSC_VER )
#define CGAL_ALIGN_16 __declspec(align(16))
#elif defined( __GNU__ )
#define CGAL_ALIGN_16 __attribute__((aligned(16)))
#endif

With MinGW64, _MSC_VER and __GNU__ are not defined.

I modified sse2.h like this to make it compile:
#if defined ( _MSC_VER )
#define CGAL_ALIGN_16 __declspec(align(16))
#elif defined( __GNU__ )
#define CGAL_ALIGN_16 __attribute__((aligned(16)))
#elif defined( __MINGW64__ )
#define CGAL_ALIGN_16 __attribute__((aligned(16)))
#endif

I was wondering to know if this is the good way to work-around my issue ?

Thanks in advance,

Vincent Rouvreau
//
// compiler_config.h is included by CGAL headers to load the needed compiler settings.
//
// DO NOT EDIT compiler_config.h. It is generated by CMake.
//

//#define CGAL_CFG_BOOST_VARIANT_SWAP_BUG 1

//#define CGAL_CFG_DENORMALS_COMPILE_BUG 1

//#define CGAL_CFG_FPU_ROUNDING_MODE_UNWINDING_VC_BUG 1

//#define CGAL_CFG_IEEE_754_BUG 1

//#define CGAL_CFG_ISTREAM_INT_BUG 1

//#define CGAL_CFG_MATCHING_BUG_5 1

//#define CGAL_CFG_MATCHING_BUG_6 1

//#define CGAL_CFG_MATCHING_BUG_7 1

//#define CGAL_CFG_MATCHING_BUG_8 1

//#define CGAL_CFG_NESTED_CLASS_FRIEND_DECLARATION_BUG 1

//#define CGAL_CFG_NO_LIMITS 1

//#define CGAL_CFG_NO_NEXTAFTER 1

//#define CGAL_CFG_NO_STL 1

//#define CGAL_CFG_NO_WARNING_CPP_DIRECTIVE_BUG 1

//#define CGAL_CFG_NUMERIC_LIMITS_BUG 1

//#define CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG 1

//#define CGAL_CFG_TEMPLATE_IN_DEFAULT_PARAMETER_BUG 1

//#define CGAL_CFG_TYPENAME_BEFORE_DEFAULT_ARGUMENT_BUG 1

//#define CGAL_CFG_USING_BASE_MEMBER_BUG_2 1

//#define CGAL_USE_GMP 1

//#define CGAL_USE_MPFR 1

//#define CGAL_USE_GMPXX 1

//#define CGAL_USE_LEDA 1

//#define CGAL_USE_MPFI 1

//#define CGAL_USE_RS 1

//#define CGAL_USE_NTL 1

#define CGAL_BUILD_SHARED_LIBS 1

//#define CGAL_USE_CORE 1

#define CGAL_HAS_IMAGEIO 1

#define CGAL_HAS_QT4 1




Archive powered by MHonArc 2.6.18.

Top of Page