Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] __declspec(dllexport) and CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] __declspec(dllexport) and CGAL


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Cc: "Sybren A. Stüvel" <>
  • Subject: Re: [cgal-discuss] __declspec(dllexport) and CGAL
  • Date: Fri, 19 Mar 2010 12:06:18 +0100
  • Organization: GeometryFactory

Hi Sybren,

it seems nobody has a clue about that strange error. On your side, have you
found out a solution for that issue?

On Thursday 04 March 2010 13:28:27 Sybren A. Stüvel wrote:
> Hi folks,
>
> I've got a class Vector_3 that subclasses the CGAL Vector_3 class:
>
> #include <CGAL/basic.h>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
>
> class Vector_3 : public K::Vector_3 {
> ... our own stuff ...
> }
>
> Previously this class was only used in a static library, and worked just
> fine. Now we're moving some libraries to dynamic ones. In Linux I built
> .so files and that works fine too, but DLL files on Windows are giving me
> errors.
>
> In order to export a class so that it's visible outside the DLL, I have to
> add __declspec(dllexport) to it. Fine by me, but when I try to export our
> Vector_3 I get this error. Does any of you have any experience with this?
> We're using the C++ compiler from Microsoft Visual Studio 2005.
>
> Regards,
> Sybren
>
> cl /Fointermediate\src\libs\libmath\Quaternion.obj /c
> src\libs\libmath\Quaternion.cpp /nologo /TP /Zm800 /W3
> /Ideps/boost/include /Ideps/CGAL/include
> /Ideps/CGAL/auxiliary/gmp/include /Od /D_DEBUG /RTCsu /EHsc /MDd /nologo
> /Isrc\libs /Isrc
>
> Quaternion.cpp deps/CGAL/include\CGAL/Vector_3.h(131) : error C2664:
> 'CGAL::Vector_3<R_>
> CGAL::CartesianKernelFunctors::Construct_divided_vector_3<K>::operator
> ()(const CGAL::Vector_3<R_> &,const double &) const' : cannot convert
> parameter 2 from 'const C
> GAL::First_if_different<A,B>::Type' to 'const double &'
> with
> [
> R_=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>,
> K=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>
> ]
> and
> [
> A=double,
> B=double
> ]
> Reason: cannot convert from 'const
> CGAL::First_if_different<A,B>::Type' to 'const double'
> with
> [
> A=double,
> B=double
> ]
> No user-defined-conversion operator available that can perform
> this conversion, or the operator cannot be called
>
> deps/CGAL/include\CGAL/Vector_3.h(130) : while compiling class
> template member function 'CGAL::Vector_3<R_> CGAL
>
> ::Vector_3<R_>::operator /(const CGAL::First_if_different<A,B>::Type &)
>
> const'
> with
> [
> R_=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>,
> A=double,
> B=double
> ]
> c:\home\blage\src\libs\libmath\vector_3.h(26) : see reference to
> class template instantiation 'CGAL::Vector_3<R_
>
> >' being compiled
>
> with
> [
> R_=CGAL::Filtered_kernel<CGAL::Simple_cartesian<double>>
> ]


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



Archive powered by MHonArc 2.6.16.

Top of Page