Subject: CGAL users discussion list
List archive
- From: "Laurent Rineau (CGAL/GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] mingw64|win32 issues
- Date: Fri, 11 Apr 2014 15:23:05 +0200
- Organization: GeometryFactory
Le Thursday 10 April 2014 08:38:59 xantares 09 a écrit :
> I compiled cgal with mingw64 from linux and there are a few issues:
Indeed, that platform in not yet supported by the CGAL project.
> 1. In cmake/modules/CGAL_SetupBoost.cmake, the boost thread component is
> misnamed for windows platforms:
>
> find_package( Boost 1.33.1 REQUIRED thread system )
>
> should be replaced by:
>
> if (WIN32)
>
> find_package( Boost 1.33.1 REQUIRED thread_win32 system )
>
> else ()
>
> find_package( Boost 1.33.1 REQUIRED thread system )
>
> endif()
Which Linux distribution are you using? On Fedora, the mingw32 version of
libboost_thread is named libboost_thread-mt.dll.a. If on your distribution it
is named differently, you should discuss with the packagers of the mingw32
boost packages, to find out a solution.
> 2. There's a compilation error with the x86_64 target:
>
> Scanning dependencies of target CGAL
>
> mingw-w64-cgal/src/CGAL-4.4/include/CGAL/double.h: In function 'double
> CGAL::sse2fabs(double)':
>
> mingw-w64-cgal/src/CGAL-4.4/include/CGAL/double.h:132:10: error:
> 'CGAL_ALIGN_16' does not name a type
As I said, that compiler is not supported. But maybe that is easy. In the
file
<CGAL/sse2.h>, please try to replace the line:
#if defined ( _MSC_VER )
by:
#if defined( _MSC_VER ) || defined(__MINGW32__)
Maybe that is sufficient.
Edit: ... I see that below you propose something. Your solution is good too:
> But if I replace _MSC_VER by _WIN32 in include/CGAL/sse2.h, both i686 and
> x86_64 targets are fine
>
> #if defined ( _WIN32 )
>
> #define CGAL_ALIGN_16 __declspec(align(16))
>
> #elif defined( __GNU__ )
>
> #define CGAL_ALIGN_16 __attribute__((aligned(16)))
>
> #endif
>
> But I don't really know what I'm doing for this one :]
In the code of <CGAL/double.h> and <CGAL/sse2.h>, we implicitly supposed that
all MSVC-compatible compilers define _MSC_VER.
> 3. Export libraries (.dll) are properly installed to <PREFIX>/bin and import
> libraries (.dll.a) to <PREFIX>/lib.
>
> But in the CGALConfig.cmake file, the CGAL*_LIBRARY vars refer to
> the export library name in <PREFIX>/lib:
Which CGALConfig.cmake are you talking about. There are two:
- one that must be used when one want to use compiled libraries within the
compilation tree,
- one that must be used when the CGAL libraries are installed by 'make
install'.
> set(CGAL_LIBRARY "/usr/i686-w64-mingw32/lib/libCGAL.dll")
That seems to be the CGALConfig.cmake that will be installed.
- [cgal-discuss] mingw64|win32 issues, xantares 09, 04/10/2014
- Re: [cgal-discuss] mingw64|win32 issues, Laurent Rineau (CGAL/GeometryFactory), 04/11/2014
- RE: [cgal-discuss] mingw64|win32 issues, xantares 09, 04/11/2014
- Re: [cgal-discuss] mingw64|win32 issues, Laurent Rineau (CGAL/GeometryFactory), 04/11/2014
- RE: [cgal-discuss] mingw64|win32 issues, xantares 09, 04/11/2014
- Re: [cgal-discuss] mingw64|win32 issues, Laurent Rineau (CGAL/GeometryFactory), 04/11/2014
- Re: [cgal-discuss] mingw64|win32 issues, Laurent Rineau (CGAL/GeometryFactory), 04/11/2014
Archive powered by MHonArc 2.6.18.