Subject: CGAL users discussion list
List archive
- From: "Sybren A. Stüvel" <>
- To: "CGAL-discuss" <>
- Subject: [cgal-discuss] __declspec(dllexport) and CGAL
- Date: Thu, 4 Mar 2010 13:28:27 +0100
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>>
]
Attachment:
signature.asc
Description: This is a digitally signed message part.
- [cgal-discuss] __declspec(dllexport) and CGAL, Sybren A. Stüvel, 03/04/2010
- Re: [cgal-discuss] __declspec(dllexport) and CGAL, Laurent Rineau (GeometryFactory), 03/19/2010
- Message not available
- Re: [cgal-discuss] __declspec(dllexport) and CGAL, Laurent Rineau (GeometryFactory), 03/19/2010
- Message not available
- Re: [cgal-discuss] __declspec(dllexport) and CGAL, Laurent Rineau (GeometryFactory), 03/19/2010
Archive powered by MHonArc 2.6.16.