Subject: CGAL users discussion list
List archive
- From: Dragan Vidovic <>
- To:
- Subject: Re: [cgal-discuss] CGAL disables exception handling in MingW
- Date: Tue, 26 Feb 2013 13:19:26 +0100
Thank you for your reply Laurent. While making a simple example to
send to you, I have solved the problem. I removed the "-static"
compiler option and now it works. But I am not sure why wouldn't it
work with -static. I have read somewhere that CGAL won't link against
static blas libraries but uses dll instead, so I guess that this could
be related. Anyway, if you think that this should be looked into, the
example is in the attachment.
Dragan
On Tue, Feb 26, 2013 at 11:20 AM, Laurent Rineau
(CGAL/GeometryFactory)
<>
wrote:
> Le mardi 26 février 2013 10:13:32 Dragan Vidovic a écrit :
>
>> Exception handling stops working in my C++ program if I link it with
>
>> CGAL in MingW, even if no CGAL code is executed. If CGAL is removed,
>
>> exception handling works fine. In Linux everything works fine. I tried
>
>> adding the -mthreads options to the compiler and to the linker while
>
>> building CGAL and my program, but this did not change anything. I
>
>> noticed this problem with CGAL-3.9 and CGAL-4.1 using boost_1_46_0 or
>
>> boost_1_53_0. Compiler version is 4.6.2.
>
>
>
> That issue will probably be difficult to debug.
>
>
>
> Can you please show us a simple .cpp that compiles with MinGW, uses
> exceptions correctly, and no longer runs correctly once CGAL libraries are
> linked with the executable? I will use that to try to reproduce and debug.
>
>
>
> Have you use the same version of the compiler to build the CGAL libraries?
>
>
>
> --
>
> Laurent Rineau, PhD
>
> R&D Engineer at GeometryFactory http://www.geometryfactory.com/
>
> Release Manager of the CGAL Project http://www.cgal.org/
>
>
project (test)
cmake_minimum_required(VERSION 2.6.2)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6)
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}"
VERSION_GREATER 2.8.3)
cmake_policy(VERSION 2.8.4)
else()
cmake_policy(VERSION 2.6)
endif()
endif()
find_package(CGAL QUIET COMPONENTS Core )
if ( CGAL_FOUND )
include( ${CGAL_USE_FILE} )
set(CMAKE_CXX_FLAGS "-g -O2 -Wall -std=c++0x -DWIN32 -static -fopenmp
-mthreads -fexceptions")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_EXE_LINKER_FLAGS "-g -O2 -std=c++0x -Wall -static -fopenmp
-mthreads -fexceptions")
set(CGAL_EXE_LINKER_FLAGS_RELEASE "-O3 -DNDEBUG")
add_executable(test test.cc)
target_link_libraries(test )
else()
message(STATUS "This program requires the CGAL library, and will not be
compiled.")
endif()
Attachment:
test.cc
Description: Binary data
- [cgal-discuss] CGAL disables exception handling in MingW, Dragan Vidovic, 02/26/2013
- Re: [cgal-discuss] CGAL disables exception handling in MingW, Laurent Rineau (CGAL/GeometryFactory), 02/26/2013
- Re: [cgal-discuss] CGAL disables exception handling in MingW, Dragan Vidovic, 02/26/2013
- Re:Re: [cgal-discuss] CGAL disables exception handling in MingW, ak, 02/26/2013
- Re: [cgal-discuss] CGAL disables exception handling in MingW, 杨成林, 02/27/2013
- Re: [cgal-discuss] CGAL disables exception handling in MingW, Dragan Vidovic, 02/26/2013
- Re: [cgal-discuss] CGAL disables exception handling in MingW, Laurent Rineau (CGAL/GeometryFactory), 02/26/2013
Archive powered by MHonArc 2.6.18.