Compiler errors with sweep line example

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiler errors with sweep line example

malcolm
Hi,
I want to use the sweep line algorithm to compute intersections between a
set of line segments.
I used the code posted in the examples  here
<https://doc.cgal.org/4.13.2/Surface_sweep_2/Surface_sweep_2_2plane_sweep_8cpp-example.html>
.

I get these compile errors:
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_get_emin referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_set_emin referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_set_q referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_get_d referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_subnormalize referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)

What do I need to change? I have been able to use the other CGAL examples
without such errors.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Compiler errors with sweep line example

Mukherjee, Soham
Use g++ -o exexutable_name LineIntersections.cpp -lcgal -lgmp -lmpfr

In short use gmp and mpfr libraries to link with.


From: [hidden email] <[hidden email]> on behalf of malcolm <[hidden email]>
Sent: Monday, November 11, 2019 12:20:31 PM
To: [hidden email] <[hidden email]>
Subject: [cgal-discuss] Compiler errors with sweep line example
 
Hi,
I want to use the sweep line algorithm to compute intersections between a
set of line segments.
I used the code posted in the examples  here
<https://doc.cgal.org/4.13.2/Surface_sweep_2/Surface_sweep_2_2plane_sweep_8cpp-example.html>
.

I get these compile errors:
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_get_emin referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_set_emin referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_set_q referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_get_d referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)
1>LineIntersections.obj : error LNK2019: unresolved external symbol
__imp_mpfr_subnormalize referenced in function "public: struct
std::pair<double,double> __cdecl CGAL::Real_embeddable_traits<class
CGAL::Gmpq>::To_interval::operator()(class CGAL::Gmpq const &)const "
(??RTo_interval@?$Real_embeddable_traits@VGmpq@CGAL@@@CGAL@@QEBA?AU?$pair@NN@std@@AEBVGmpq@2@@Z)

What do I need to change? I have been able to use the other CGAL examples
without such errors.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss


Reply | Threaded
Open this post in threaded view
|

Re: Compiler errors with sweep line example

malcolm
Thanks, Soham.
I was using the gmp but not the mpfr. Added it, and the code compiles
successfully now.



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss