Error

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

Error

iampriyanshi
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_add
referenced in function "class CGAL::Gmpq __cdecl CGAL::operator+(class
CGAL::Gmpq const &,class CGAL::Gmpq const &)"
(??HCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_clear
referenced in function "public: __cdecl CGAL::Gmpq_rep::~Gmpq_rep(void)"
(??1Gmpq_rep@CGAL@@QEAA@XZ)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp
referenced in function "public: bool __cdecl CGAL::Gmpq::operator<(class
CGAL::Gmpq const &)const " (??MGmpq@CGAL@@QEBA_NAEBV01@@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp_si
referenced in function "public: bool __cdecl
CGAL::Gmpq::operator==(int)const " (??8Gmpq@CGAL@@QEBA_NH@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_div
referenced in function "class CGAL::Gmpq __cdecl CGAL::operator/(class
CGAL::Gmpq const &,class CGAL::Gmpq const &)"
(??KCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_equal
referenced in function "public: bool __cdecl CGAL::Gmpq::operator==(class
CGAL::Gmpq const &)const " (??8Gmpq@CGAL@@QEBA_NAEBV01@@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_init
referenced in function "public: __cdecl CGAL::Gmpq_rep::Gmpq_rep(void)"
(??0Gmpq_rep@CGAL@@QEAA@XZ)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_mul
referenced in function "class CGAL::Gmpq __cdecl CGAL::operator*(class
CGAL::Gmpq const &,class CGAL::Gmpq const &)"
(??DCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set
referenced in function __gmpq_neg
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_d
referenced in function "public: __cdecl CGAL::Gmpq::Gmpq(double)"
(??0Gmpq@CGAL@@QEAA@N@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_si
referenced in function "public: __cdecl CGAL::Gmpq::Gmpq(int)"
(??0Gmpq@CGAL@@QEAA@H@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpq_sub
referenced in function "class CGAL::Gmpq __cdecl CGAL::operator-(class
CGAL::Gmpq const &,class CGAL::Gmpq const &)"
(??GCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpn_add_n
referenced in function __gmpn_add
main.obj : error LNK2019: unresolved external symbol __imp___gmpn_mul
referenced in function "struct CGAL::Mpzf __cdecl CGAL::operator*(struct
CGAL::Mpzf const &,struct CGAL::Mpzf const &)"
(??DCGAL@@YA?AUMpzf@0@AEBU10@0@Z)
main.obj : error LNK2019: unresolved external symbol __imp___gmpn_sub_n
referenced in function __gmpn_sub
main.obj : error LNK2019: unresolved external symbol __imp___gmpn_copyi
referenced in function "public: __cdecl CGAL::Mpzf::Mpzf(struct CGAL::Mpzf
const &)" (??0Mpzf@CGAL@@QEAA@AEBU01@@Z)
main.obj : error LNK2019: unresolved external symbol __imp_mpfr_init2
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)
main.obj : error LNK2019: unresolved external symbol __imp_mpfr_clear
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)
main.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)
main.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)
C:\dev\Projects\MESH\x64\Debug\\MESH.exe : fatal error LNK1120: 20
unresolved externals
.
.
.
.
.
.
Problem that causes the above problem

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Surface_mesh<K::Point_3>             Mesh;
namespace PMP = CGAL::Polygon_mesh_processing;
int main(int argc, char* argv[])
{
  const char* filename1 = (argc > 1) ? argv[1] : "data/blobby.off";
  const char* filename2 = (argc > 2) ? argv[2] : "data/eight.off";
  std::ifstream input(filename1);
  Mesh mesh1, mesh2;
  if (!input || !(input >> mesh1))
  {
    std::cerr << "First mesh is not a valid off file." << std::endl;
    return 1;
  }
  input.close();
  input.open(filename2);
  if (!input || !(input >> mesh2))
  {
    std::cerr << "Second mesh is not a valid off file." << std::endl;
    return 1;
  }
  Mesh out;
  bool valid_union = PMP::corefine_and_compute_union(mesh1,mesh2, out);
  if (valid_union)
  {
    std::cout << "Union was successfully computed\n";
    std::ofstream output("union.off");
    output << out;
    return 0;
  }
  std::cout << "Union could not be computed\n";
  return 1;
}



--
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: Error

Sebastien Loriot (GeometryFactory)
You must link with libgmp, libmpfr and libCGAL.

Sebastien.

On 02/21/2018 07:40 AM, iampriyanshi wrote:

> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_add
> referenced in function "class CGAL::Gmpq __cdecl CGAL::operator+(class
> CGAL::Gmpq const &,class CGAL::Gmpq const &)"
> (??HCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_clear
> referenced in function "public: __cdecl CGAL::Gmpq_rep::~Gmpq_rep(void)"
> (??1Gmpq_rep@CGAL@@QEAA@XZ)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp
> referenced in function "public: bool __cdecl CGAL::Gmpq::operator<(class
> CGAL::Gmpq const &)const " (??MGmpq@CGAL@@QEBA_NAEBV01@@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp_si
> referenced in function "public: bool __cdecl
> CGAL::Gmpq::operator==(int)const " (??8Gmpq@CGAL@@QEBA_NH@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_div
> referenced in function "class CGAL::Gmpq __cdecl CGAL::operator/(class
> CGAL::Gmpq const &,class CGAL::Gmpq const &)"
> (??KCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_equal
> referenced in function "public: bool __cdecl CGAL::Gmpq::operator==(class
> CGAL::Gmpq const &)const " (??8Gmpq@CGAL@@QEBA_NAEBV01@@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_init
> referenced in function "public: __cdecl CGAL::Gmpq_rep::Gmpq_rep(void)"
> (??0Gmpq_rep@CGAL@@QEAA@XZ)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_mul
> referenced in function "class CGAL::Gmpq __cdecl CGAL::operator*(class
> CGAL::Gmpq const &,class CGAL::Gmpq const &)"
> (??DCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set
> referenced in function __gmpq_neg
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_d
> referenced in function "public: __cdecl CGAL::Gmpq::Gmpq(double)"
> (??0Gmpq@CGAL@@QEAA@N@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_si
> referenced in function "public: __cdecl CGAL::Gmpq::Gmpq(int)"
> (??0Gmpq@CGAL@@QEAA@H@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpq_sub
> referenced in function "class CGAL::Gmpq __cdecl CGAL::operator-(class
> CGAL::Gmpq const &,class CGAL::Gmpq const &)"
> (??GCGAL@@YA?AVGmpq@0@AEBV10@0@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpn_add_n
> referenced in function __gmpn_add
> main.obj : error LNK2019: unresolved external symbol __imp___gmpn_mul
> referenced in function "struct CGAL::Mpzf __cdecl CGAL::operator*(struct
> CGAL::Mpzf const &,struct CGAL::Mpzf const &)"
> (??DCGAL@@YA?AUMpzf@0@AEBU10@0@Z)
> main.obj : error LNK2019: unresolved external symbol __imp___gmpn_sub_n
> referenced in function __gmpn_sub
> main.obj : error LNK2019: unresolved external symbol __imp___gmpn_copyi
> referenced in function "public: __cdecl CGAL::Mpzf::Mpzf(struct CGAL::Mpzf
> const &)" (??0Mpzf@CGAL@@QEAA@AEBU01@@Z)
> main.obj : error LNK2019: unresolved external symbol __imp_mpfr_init2
> 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)
> main.obj : error LNK2019: unresolved external symbol __imp_mpfr_clear
> 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)
> main.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)
> main.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)
> C:\dev\Projects\MESH\x64\Debug\\MESH.exe : fatal error LNK1120: 20
> unresolved externals
> .
> .
> .
> .
> .
> .
> Problem that causes the above problem
>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
> #include <CGAL/Surface_mesh.h>
> #include <CGAL/Polygon_mesh_processing/corefinement.h>
> #include <fstream>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef CGAL::Surface_mesh<K::Point_3>             Mesh;
> namespace PMP = CGAL::Polygon_mesh_processing;
> int main(int argc, char* argv[])
> {
>    const char* filename1 = (argc > 1) ? argv[1] : "data/blobby.off";
>    const char* filename2 = (argc > 2) ? argv[2] : "data/eight.off";
>    std::ifstream input(filename1);
>    Mesh mesh1, mesh2;
>    if (!input || !(input >> mesh1))
>    {
>      std::cerr << "First mesh is not a valid off file." << std::endl;
>      return 1;
>    }
>    input.close();
>    input.open(filename2);
>    if (!input || !(input >> mesh2))
>    {
>      std::cerr << "Second mesh is not a valid off file." << std::endl;
>      return 1;
>    }
>    Mesh out;
>    bool valid_union = PMP::corefine_and_compute_union(mesh1,mesh2, out);
>    if (valid_union)
>    {
>      std::cout << "Union was successfully computed\n";
>      std::ofstream output("union.off");
>      output << out;
>      return 0;
>    }
>    std::cout << "Union could not be computed\n";
>    return 1;
> }
>
>
>
> --
> 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: Error

iampriyanshi
I linked those libs still, it is throwing the same error.



--
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: Error

Sebastien Loriot (GeometryFactory)
Maybe a 32 vs 64 bit issue cause the missing symbol are from those 3
libraries for sure.

Sebastien.

On 02/21/2018 09:56 AM, iampriyanshi wrote:
> I linked those libs still, it is throwing the same error.
>
>
>
> --
> 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