Triangulation of points in a 4D Sphere

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

Triangulation of points in a 4D Sphere

GSBicalho
This post was updated on .
What I want to do seems simple, just create 1000 points in a 4D sphere and then triangulate them. Yet, for some reason, the code below only works aproximately 1 in 20 times, perhaps less.

---CODE---

const int D = 4; // we work in Euclidean 4-space
typedef CGAL::Dimension_tag< D > Dim_tag;
typedef CGAL::Epick_d< Dim_tag >  Kernel;
typedef CGAL::Triangulation< Kernel > Triangulation;
typedef Triangulation::Point Point_4;
typedef CGAL::Delaunay_triangulation<Kernel> DenTriangulation;

int main() {
        CGAL::Random_points_in_ball_d<Point_4> rand_it(D, 1.0);
        std::vector<Point_4> points;
        CGAL::cpp11::copy_n(rand_it, 1000, std::back_inserter(points));

        Triangulation t(D);
        CGAL_assertion(t.empty());
        t.insert(points.begin(), points.end());  // Exception is thrown here
        CGAL_assertion(t.is_valid());
}

----------

Whenever it doesn't work, it throws the exception:

Exception thrown at 0x6ACD835A (libgmp-10.dll) in array_convex_hull_2.exe: 0xC0000005: Access violation reading location 0x011C3000. occurred

It looks to me that whenever the code does work, it was lucky that the points fell in places that allowed something specific to happen. I just don't know what.

Can anyone confirm that this also happens to them?
Do the points of a triangulation require some arcane property to them that I don't know about?
Reply | Threaded
Open this post in threaded view
|

Re: Triangulation of points in a 4D Sphere

Clément Jamin-2
Hi,

On Fri, May 5, 2017 at 7:39 AM, GSBicalho <[hidden email]> wrote:

>
> What I want to do seems simple, just create 1000 points in a 4D sphere and
> then triangulate them. Yet, for some reason, the code below only works
> aproximately 1 in 20 times, perhaps less.
>
> ---CODE---
>
> const int D = 4; // we work in Euclidean 4-space
> typedef CGAL::Dimension_tag< D > Dim_tag;
> typedef CGAL::Epick_d< Dim_tag >  Kernel;
> typedef CGAL::Triangulation< Kernel > Triangulation;
> typedef Triangulation::Point Point_4;
> typedef CGAL::Delaunay_triangulation<Kernel> DenTriangulation;
>
> int main() {
>         CGAL::Random_points_in_ball_d<Point_4> rand_it(D, 1.0);
>         std::vector<Point_4> points;
>         CGAL::cpp11::copy_n(rand_it, 1000, std::back_inserter(points));
>
>         Triangulation t(D);                      // create triangulation
>         CGAL_assertion(t.empty());
>         t.insert(points.begin(), points.end());  // compute triangulation
>         CGAL_assertion(t.is_valid());
> }
>
> ----------
>

Your code works fine on my machine. Are you sure it is crashing inside
this piece of code?

>
> Whenever it doesn't work, it throws the exception:
>
> Exception thrown at 0x6ACD835A (libgmp-10.dll) in array_convex_hull_2.exe:
> 0xC0000005: Access violation reading location 0x011C3000. occurred

"array_convex_hull_2.exe"? Is it normal? Are you launching the right executable?

> It looks to me that whenever the code does work, it was lucky that the
> points fell in places that allowed /something/ specific to happen. I just
> don't know what.
>
> Can anyone confirm that this also happens to them?
> Do the points of a triangulation require some arcane property to them that I
> don't know about?
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Triangulation-of-points-in-a-4D-Sphere-tp4662712.html
> Sent from the cgal-discuss mailing list archive at 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
>
>

--
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: Triangulation of points in a 4D Sphere

GSBicalho
>Your code works fine on my machine. Are you sure it is crashing inside this piece of code?

Really? Every time? Strange. And yes, I am sure that it is crashing there, on the insert.


>"array_convex_hull_2.exe"? Is it normal? Are you launching the right executable?

Yeah, I used the example projects as base to test something, so that I wouldn't have to set everything up, and never got around to set it up properly. It is the right executable.

Huh... hell, could it be something wrong with the libgmp-10.dll? Maybe I have an old version or something like that?
Reply | Threaded
Open this post in threaded view
|

Re: Triangulation of points in a 4D Sphere

Clément Jamin-2
Hi,
Can you give some details abour your platform? 32 or 64 bits? VC++ version? Etc.

Clément.

On Fri, May 5, 2017 at 12:34 PM, GSBicalho <[hidden email]> wrote:
>Your code works fine on my machine. Are you sure it is crashing inside this
piece of code?

Really? Every time? Strange. And yes, I am sure that it is crashing there,
on the insert.


>"array_convex_hull_2.exe"? Is it normal? Are you launching the right
executable?

Yeah, I used the example projects as base to test something, so that I
wouldn't have to set everything up, and never got around to set it up
properly. It is the right executable.

Huh... hell, could it be something wrong with the libgmp-10.dll? Maybe I
have an old version or something like that?



--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Triangulation-of-points-in-a-4D-Sphere-tp4662712p4662714.html
Sent from the cgal-discuss mailing list archive at 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: Triangulation of points in a 4D Sphere

GSBicalho
I'm using Visual Studio 2017 to compile it. The computer I'm on is a Windows 8.1 64bits, but CGAL is being compiled to 32bits. I have both the x86 and the x64 versions of VC++ 2017 - 14.1.25008.
Reply | Threaded
Open this post in threaded view
|

Re: Triangulation of points in a 4D Sphere

Clément Jamin-2
Can you try compiling everything in 64 bits?
Clément.


On Tue, May 9, 2017 at 8:11 PM, GSBicalho <[hidden email]> wrote:

> I'm using Visual Studio 2017 to compile it. The computer I'm on is a Windows
> 8.1 64bits, but CGAL is being compiled to 32bits. I have both the x86 and
> the x64 versions of VC++ 2017 - 14.1.25008.
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Triangulation-of-points-in-a-4D-Sphere-tp4662712p4662719.html
> Sent from the cgal-discuss mailing list archive at 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
>
>

--
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: Triangulation of points in a 4D Sphere

GSBicalho
I've tried, however, even though it is configured exactly like the 32bit version, it gives me the following linking error:

---ERROR---

1>------ Build started: Project: CGAL_Core, Configuration: Release x64 ------
1>   Creating library C:/dev/CGAL-4.9.1/build_x64/lib/Release/CGAL_Core-vc140-mt-4.9.1.lib and object C:/dev/CGAL-4.9.1/build_x64/lib/Release/CGAL_Core-vc140-mt-4.9.1.exp
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmp_randinit referenced in function "struct __gmp_randstate_struct (* __cdecl CORE::getRandstate(void))[1]" (?getRandstate@CORE@@YAPEAY00U__gmp_randstate_struct@@XZ)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_add referenced in function "public: __cdecl CORE::BigFloatRep::BigFloatRep(double)" (??0BigFloatRep@CORE@@QEAA@N@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_add_ui referenced in function "public: class CORE::BigInt __cdecl CORE::BigInt::operator++(int)" (??EBigInt@CORE@@QEAA?AV01@H@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_and referenced in function "public: class CORE::BigInt & __cdecl CORE::BigInt::operator&=(class CORE::BigInt const &)" (??_4BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_clear referenced in function "class CORE::BigFloat __cdecl CORE::content<class CORE::BigFloat>(class CORE::Polynomial<class CORE::BigFloat> const &)" (??$content@VBigFloat@CORE@@@CORE@@YA?AVBigFloat@0@AEBV?$Polynomial@VBigFloat@CORE@@@0@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_cmp referenced in function "class CORE::BigInt __cdecl CORE::content<class CORE::BigInt>(class CORE::Polynomial<class CORE::BigInt> const &)" (??$content@VBigInt@CORE@@@CORE@@YA?AVBigInt@0@AEBV?$Polynomial@VBigInt@CORE@@@0@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_divexact referenced in function "class CORE::BigInt __cdecl CORE::div_exact(class CORE::BigInt const &,class CORE::BigInt const &)" (?div_exact@CORE@@YA?AVBigInt@1@AEBV21@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_divisible_p referenced in function "bool __cdecl CORE::isDivisible(class CORE::BigFloat const &,class CORE::BigFloat const &)" (?isDivisible@CORE@@YA_NAEBVBigFloat@1@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_gcd referenced in function "class CORE::BigInt __cdecl CORE::gcd(class CORE::BigInt const &,class CORE::BigInt const &)" (?gcd@CORE@@YA?AVBigInt@1@AEBV21@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_get_d referenced in function "public: virtual double __cdecl CORE::Realbase_for<class CORE::BigInt>::doubleValue(void)const " (?doubleValue@?$Realbase_for@VBigInt@CORE@@@CORE@@UEBANXZ)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_get_si referenced in function "public: int __cdecl CORE::BigInt::intValue(void)const " (?intValue@BigInt@CORE@@QEBAHXZ)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_get_str referenced in function "public: virtual class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl CORE::Realbase_for<class CORE::BigInt>::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &)const " (??6?$Realbase_for@VBigInt@CORE@@@CORE@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init referenced in function "public: __cdecl CORE::Sturm<class CORE::BigInt>::Sturm<class CORE::BigInt>(class CORE::Polynomial<class CORE::BigInt>)" (??0?$Sturm@VBigInt@CORE@@@CORE@@QEAA@V?$Polynomial@VBigInt@CORE@@@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init_set referenced in function "public: __cdecl CORE::BigInt::BigInt(struct __mpz_struct const *)" (??0BigInt@CORE@@QEAA@PEBU__mpz_struct@@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init_set_d referenced in function "public: __cdecl CORE::BigInt::BigInt(float)" (??0BigInt@CORE@@QEAA@M@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init_set_si referenced in function "class CORE::BigFloat __cdecl CORE::content<class CORE::BigFloat>(class CORE::Polynomial<class CORE::BigFloat> const &)" (??$content@VBigFloat@CORE@@@CORE@@YA?AVBigFloat@0@AEBV?$Polynomial@VBigFloat@CORE@@@0@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init_set_str referenced in function "public: __cdecl CORE::BigFloat::BigFloat(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0BigFloat@CORE@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_init_set_ui referenced in function "public: __cdecl CORE::BigInt::BigInt(unsigned char)" (??0BigInt@CORE@@QEAA@E@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_ior referenced in function "public: class CORE::BigInt & __cdecl CORE::BigInt::operator|=(class CORE::BigInt const &)" (??_5BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_mul referenced in function "class CORE::Polynomial<class CORE::BigInt> __cdecl CORE::gcd<class CORE::BigInt>(class CORE::Polynomial<class CORE::BigInt> const &,class CORE::Polynomial<class CORE::BigInt> const &)" (??$gcd@VBigInt@CORE@@@CORE@@YA?AV?$Polynomial@VBigInt@CORE@@@0@AEBV10@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_mul_2exp referenced in function "public: __cdecl CORE::BigFloatRep::BigFloatRep(double)" (??0BigFloatRep@CORE@@QEAA@N@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_pow_ui referenced in function "public: class CORE::BigFloat __cdecl CORE::Polynomial<class CORE::BigFloat>::sepBound(void)const " (?sepBound@?$Polynomial@VBigFloat@CORE@@@CORE@@QEBA?AVBigFloat@2@XZ)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_remove referenced in function "public: virtual void __cdecl CORE::Realbase_for<class CORE::BigInt>::ULV_E(class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &)const " (?ULV_E@?$Realbase_for@VBigInt@CORE@@@CORE@@UEBAXAEAVextLong@2@00000@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_scan1 referenced in function "public: virtual void __cdecl CORE::Realbase_for<double>::ULV_E(class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &)const " (?ULV_E@?$Realbase_for@N@CORE@@UEBAXAEAVextLong@2@00000@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_set referenced in function "public: __cdecl CORE::BigRatRep::BigRatRep(struct __mpz_struct const *,struct __mpz_struct const *)" (??0BigRatRep@CORE@@QEAA@PEBU__mpz_struct@@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_set_str referenced in function "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl CORE::io_read(class std::basic_istream<char,struct std::char_traits<char> > &,struct __mpz_struct *)" (?io_read@CORE@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@AEAV23@PEAU__mpz_struct@@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_set_ui referenced in function "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl CORE::io_read(class std::basic_istream<char,struct std::char_traits<char> > &,struct __mpz_struct *)" (?io_read@CORE@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@AEAV23@PEAU__mpz_struct@@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_sizeinbase referenced in function "public: __cdecl CORE::Realbase_for<class CORE::BigInt>::Realbase_for<class CORE::BigInt>(class CORE::BigInt const &)" (??0?$Realbase_for@VBigInt@CORE@@@CORE@@QEAA@AEBVBigInt@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_sub referenced in function "class CORE::BigInt __cdecl CORE::operator-(class CORE::BigInt const &,class CORE::BigInt const &)" (??GCORE@@YA?AVBigInt@0@AEBV10@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_sub_ui referenced in function "public: class CORE::BigInt __cdecl CORE::BigInt::operator--(int)" (??FBigInt@CORE@@QEAA?AV01@H@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_tdiv_q referenced in function "public: class CORE::BigInt & __cdecl CORE::BigInt::operator/=(class CORE::BigInt const &)" (??_0BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_tdiv_q_2exp referenced in function "class CORE::BigInt __cdecl CORE::operator>>(class CORE::BigInt const &,unsigned long)" (??5CORE@@YA?AVBigInt@0@AEBV10@K@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_tdiv_qr referenced in function "public: void __cdecl CORE::BigFloatRep::div(class CORE::BigFloatRep const &,class CORE::BigFloatRep const &,class CORE::extLong const &)" (?div@BigFloatRep@CORE@@QEAAXAEBV12@0AEBVextLong@2@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_tdiv_r referenced in function "class CORE::BigInt __cdecl CORE::operator%(class CORE::BigInt const &,class CORE::BigInt const &)" (??LCORE@@YA?AVBigInt@0@AEBV10@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_xor referenced in function "public: class CORE::BigInt & __cdecl CORE::BigInt::operator^=(class CORE::BigInt const &)" (??_6BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_add referenced in function "public: class CORE::BigRat __cdecl CORE::Polynomial<class CORE::BigRat>::eval<class CORE::BigFloat>(class CORE::BigFloat const &)const " (??$eval@VBigFloat@CORE@@@?$Polynomial@VBigRat@CORE@@@CORE@@QEBA?AVBigRat@1@AEBVBigFloat@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_canonicalize referenced in function "public: __cdecl CORE::BigRatRep::BigRatRep(struct __mpz_struct const *,struct __mpz_struct const *)" (??0BigRatRep@CORE@@QEAA@PEBU__mpz_struct@@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_clear referenced in function "class CORE::BigRat __cdecl CORE::content<class CORE::BigRat>(class CORE::Polynomial<class CORE::BigRat> const &)" (??$content@VBigRat@CORE@@@CORE@@YA?AVBigRat@0@AEBV?$Polynomial@VBigRat@CORE@@@0@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp referenced in function "class CORE::BigRat __cdecl CORE::content<class CORE::BigRat>(class CORE::Polynomial<class CORE::BigRat> const &)" (??$content@VBigRat@CORE@@@CORE@@YA?AVBigRat@0@AEBV?$Polynomial@VBigRat@CORE@@@0@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_div referenced in function "class CORE::BigRat __cdecl CORE::operator/(class CORE::BigRat const &,class CORE::BigRat const &)" (??KCORE@@YA?AVBigRat@0@AEBV10@0@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_get_d referenced in function "public: virtual double __cdecl CORE::Realbase_for<class CORE::BigRat>::doubleValue(void)const " (?doubleValue@?$Realbase_for@VBigRat@CORE@@@CORE@@UEBANXZ)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_get_str referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl CORE::BigRat::get_str(int)const " (?get_str@BigRat@CORE@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_init referenced in function "public: __cdecl CORE::BigRat::BigRat(class CORE::BigFloat const &)" (??0BigRat@CORE@@QEAA@AEBVBigFloat@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_mul referenced in function "public: class CORE::BigRat __cdecl CORE::Polynomial<class CORE::BigRat>::eval<class CORE::BigFloat>(class CORE::BigFloat const &)const " (??$eval@VBigFloat@CORE@@@?$Polynomial@VBigRat@CORE@@@CORE@@QEBA?AVBigRat@1@AEBVBigFloat@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set referenced in function "public: __cdecl CORE::BigRatRep::BigRatRep(class CORE::BigRatRep const &)" (??0BigRatRep@CORE@@QEAA@AEBV01@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_d referenced in function "public: __cdecl CORE::BigRat::BigRat(double)" (??0BigRat@CORE@@QEAA@N@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_si referenced in function "public: __cdecl CORE::BigRat::BigRat(int)" (??0BigRat@CORE@@QEAA@H@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_str referenced in function "public: __cdecl CORE::BigRat::BigRat(char const *)" (??0BigRat@CORE@@QEAA@PEBD@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set_z referenced in function "public: __cdecl CORE::BigRat::BigRat(class CORE::BigInt const &)" (??0BigRat@CORE@@QEAA@AEBVBigInt@1@@Z)
1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_sub referenced in function "class CORE::BigRat __cdecl CORE::operator-(class CORE::BigRat const &,class CORE::BigRat const &)" (??GCORE@@YA?AVBigRat@0@AEBV10@0@Z)
1>..\..\..\auxiliary\gmp\lib\libmpfr-4.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>..\..\..\auxiliary\gmp\lib\libgmp-10.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
1>C:\dev\CGAL-4.9.1\build_x64\bin\Release\CGAL_Core-vc140-mt-4.9.1.dll : fatal error LNK1120: 50 unresolved externals
1>Done building project "CGAL_Core.vcxproj" -- FAILED.

---------

I'd guess that this happens because the "libgmp-10.dll" and "libmpfr-4.dll" are in 32bits, and I can't find 64bits versions of them.

Now I've managed to compile and run the program on Linux, and it works perfectly, but I'd still like to get it working on Windows.
Reply | Threaded
Open this post in threaded view
|

Re: Triangulation of points in a 4D Sphere

Clément Jamin-2
Hi,
When you install CGAL with the installer, there is an choice between
32 and 64 bits. So I guess you need to install CGAL again.
Clément.


On Fri, May 12, 2017 at 4:26 PM, GSBicalho <[hidden email]> wrote:

> I've tried, however, even though it is configured exactly like the 32bit
> version, it gives me the following linking error:
>
> ---ERROR---
>
> 1>------ Build started: Project: CGAL_Core, Configuration: Release x64
> ------
> 1>   Creating library
> C:/dev/CGAL-4.9.1/build_x64/lib/Release/CGAL_Core-vc140-mt-4.9.1.lib and
> object C:/dev/CGAL-4.9.1/build_x64/lib/Release/CGAL_Core-vc140-mt-4.9.1.exp
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmp_randinit referenced in function "struct __gmp_randstate_struct
> (* __cdecl CORE::getRandstate(void))[1]"
> (?getRandstate@CORE@@YAPEAY00U__gmp_randstate_struct@@XZ)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_add
> referenced in function "public: __cdecl
> CORE::BigFloatRep::BigFloatRep(double)" (??0BigFloatRep@CORE@@QEAA@N@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_add_ui referenced in function "public: class CORE::BigInt
> __cdecl CORE::BigInt::operator++(int)" (??EBigInt@CORE@@QEAA?AV01@H@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_and
> referenced in function "public: class CORE::BigInt & __cdecl
> CORE::BigInt::operator&=(class CORE::BigInt const &)"
> (??_4BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_clear referenced in function "class CORE::BigFloat __cdecl
> CORE::content<class CORE::BigFloat>(class CORE::Polynomial<class
> CORE::BigFloat> const &)"
> (??$content@VBigFloat@CORE@@@CORE@@YA?AVBigFloat@0@AEBV?$Polynomial@VBigFloat@CORE@@@0@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_cmp
> referenced in function "class CORE::BigInt __cdecl CORE::content<class
> CORE::BigInt>(class CORE::Polynomial<class CORE::BigInt> const &)"
> (??$content@VBigInt@CORE@@@CORE@@YA?AVBigInt@0@AEBV?$Polynomial@VBigInt@CORE@@@0@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_divexact referenced in function "class CORE::BigInt __cdecl
> CORE::div_exact(class CORE::BigInt const &,class CORE::BigInt const &)"
> (?div_exact@CORE@@YA?AVBigInt@1@AEBV21@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_divisible_p referenced in function "bool __cdecl
> CORE::isDivisible(class CORE::BigFloat const &,class CORE::BigFloat const
> &)" (?isDivisible@CORE@@YA_NAEBVBigFloat@1@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_gcd
> referenced in function "class CORE::BigInt __cdecl CORE::gcd(class
> CORE::BigInt const &,class CORE::BigInt const &)"
> (?gcd@CORE@@YA?AVBigInt@1@AEBV21@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_get_d referenced in function "public: virtual double __cdecl
> CORE::Realbase_for<class CORE::BigInt>::doubleValue(void)const "
> (?doubleValue@?$Realbase_for@VBigInt@CORE@@@CORE@@UEBANXZ)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_get_si referenced in function "public: int __cdecl
> CORE::BigInt::intValue(void)const " (?intValue@BigInt@CORE@@QEBAHXZ)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_get_str referenced in function "public: virtual class
> std::basic_ostream<char,struct std::char_traits&lt;char> > & __cdecl
> CORE::Realbase_for<class CORE::BigInt>::operator<<(class
> std::basic_ostream<char,struct std::char_traits&lt;char> > &)const "
> (??6?$Realbase_for@VBigInt@CORE@@@CORE@@UEBAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AEAV23@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init referenced in function "public: __cdecl CORE::Sturm<class
> CORE::BigInt>::Sturm<class CORE::BigInt>(class CORE::Polynomial<class
> CORE::BigInt>)"
> (??0?$Sturm@VBigInt@CORE@@@CORE@@QEAA@V?$Polynomial@VBigInt@CORE@@@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init_set referenced in function "public: __cdecl
> CORE::BigInt::BigInt(struct __mpz_struct const *)"
> (??0BigInt@CORE@@QEAA@PEBU__mpz_struct@@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init_set_d referenced in function "public: __cdecl
> CORE::BigInt::BigInt(float)" (??0BigInt@CORE@@QEAA@M@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init_set_si referenced in function "class CORE::BigFloat
> __cdecl CORE::content<class CORE::BigFloat>(class CORE::Polynomial<class
> CORE::BigFloat> const &)"
> (??$content@VBigFloat@CORE@@@CORE@@YA?AVBigFloat@0@AEBV?$Polynomial@VBigFloat@CORE@@@0@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init_set_str referenced in function "public: __cdecl
> CORE::BigFloat::BigFloat(class std::basic_string<char,struct
> std::char_traits&lt;char>,class std::allocator<char> > const &)"
> (??0BigFloat@CORE@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_init_set_ui referenced in function "public: __cdecl
> CORE::BigInt::BigInt(unsigned char)" (??0BigInt@CORE@@QEAA@E@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_ior
> referenced in function "public: class CORE::BigInt & __cdecl
> CORE::BigInt::operator|=(class CORE::BigInt const &)"
> (??_5BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_mul
> referenced in function "class CORE::Polynomial<class CORE::BigInt> __cdecl
> CORE::gcd<class CORE::BigInt>(class CORE::Polynomial<class CORE::BigInt>
> const &,class CORE::Polynomial<class CORE::BigInt> const &)"
> (??$gcd@VBigInt@CORE@@@CORE@@YA?AV?$Polynomial@VBigInt@CORE@@@0@AEBV10@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_mul_2exp referenced in function "public: __cdecl
> CORE::BigFloatRep::BigFloatRep(double)" (??0BigFloatRep@CORE@@QEAA@N@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_pow_ui referenced in function "public: class CORE::BigFloat
> __cdecl CORE::Polynomial<class CORE::BigFloat>::sepBound(void)const "
> (?sepBound@?$Polynomial@VBigFloat@CORE@@@CORE@@QEBA?AVBigFloat@2@XZ)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_remove referenced in function "public: virtual void __cdecl
> CORE::Realbase_for<class CORE::BigInt>::ULV_E(class CORE::extLong &,class
> CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class
> CORE::extLong &,class CORE::extLong &)const "
> (?ULV_E@?$Realbase_for@VBigInt@CORE@@@CORE@@UEBAXAEAVextLong@2@00000@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_scan1 referenced in function "public: virtual void __cdecl
> CORE::Realbase_for<double>::ULV_E(class CORE::extLong &,class CORE::extLong
> &,class CORE::extLong &,class CORE::extLong &,class CORE::extLong &,class
> CORE::extLong &)const "
> (?ULV_E@?$Realbase_for@N@CORE@@UEBAXAEAVextLong@2@00000@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_set
> referenced in function "public: __cdecl CORE::BigRatRep::BigRatRep(struct
> __mpz_struct const *,struct __mpz_struct const *)"
> (??0BigRatRep@CORE@@QEAA@PEBU__mpz_struct@@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_set_str referenced in function "class
> std::basic_istream<char,struct std::char_traits&lt;char> > & __cdecl
> CORE::io_read(class std::basic_istream<char,struct std::char_traits&lt;char>
>> &,struct __mpz_struct *)"
> (?io_read@CORE@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@AEAV23@PEAU__mpz_struct@@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_set_ui referenced in function "class
> std::basic_istream<char,struct std::char_traits&lt;char> > & __cdecl
> CORE::io_read(class std::basic_istream<char,struct std::char_traits&lt;char>
>> &,struct __mpz_struct *)"
> (?io_read@CORE@@YAAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@AEAV23@PEAU__mpz_struct@@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_sizeinbase referenced in function "public: __cdecl
> CORE::Realbase_for<class CORE::BigInt>::Realbase_for<class
> CORE::BigInt>(class CORE::BigInt const &)"
> (??0?$Realbase_for@VBigInt@CORE@@@CORE@@QEAA@AEBVBigInt@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_sub
> referenced in function "class CORE::BigInt __cdecl CORE::operator-(class
> CORE::BigInt const &,class CORE::BigInt const &)"
> (??GCORE@@YA?AVBigInt@0@AEBV10@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_sub_ui referenced in function "public: class CORE::BigInt
> __cdecl CORE::BigInt::operator--(int)" (??FBigInt@CORE@@QEAA?AV01@H@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_tdiv_q referenced in function "public: class CORE::BigInt &
> __cdecl CORE::BigInt::operator/=(class CORE::BigInt const &)"
> (??_0BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_tdiv_q_2exp referenced in function "class CORE::BigInt __cdecl
> CORE::operator>>(class CORE::BigInt const &,unsigned long)"
> (??5CORE@@YA?AVBigInt@0@AEBV10@K@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_tdiv_qr referenced in function "public: void __cdecl
> CORE::BigFloatRep::div(class CORE::BigFloatRep const &,class
> CORE::BigFloatRep const &,class CORE::extLong const &)"
> (?div@BigFloatRep@CORE@@QEAAXAEBV12@0AEBVextLong@2@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpz_tdiv_r referenced in function "class CORE::BigInt __cdecl
> CORE::operator%(class CORE::BigInt const &,class CORE::BigInt const &)"
> (??LCORE@@YA?AVBigInt@0@AEBV10@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpz_xor
> referenced in function "public: class CORE::BigInt & __cdecl
> CORE::BigInt::operator^=(class CORE::BigInt const &)"
> (??_6BigInt@CORE@@QEAAAEAV01@AEBV01@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_add
> referenced in function "public: class CORE::BigRat __cdecl
> CORE::Polynomial<class CORE::BigRat>::eval<class CORE::BigFloat>(class
> CORE::BigFloat const &)const "
> (??$eval@VBigFloat@CORE@@@?$Polynomial@VBigRat@CORE@@@CORE@@QEBA?AVBigRat@1@AEBVBigFloat@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_canonicalize referenced in function "public: __cdecl
> CORE::BigRatRep::BigRatRep(struct __mpz_struct const *,struct __mpz_struct
> const *)" (??0BigRatRep@CORE@@QEAA@PEBU__mpz_struct@@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_clear referenced in function "class CORE::BigRat __cdecl
> CORE::content<class CORE::BigRat>(class CORE::Polynomial<class CORE::BigRat>
> const &)"
> (??$content@VBigRat@CORE@@@CORE@@YA?AVBigRat@0@AEBV?$Polynomial@VBigRat@CORE@@@0@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_cmp
> referenced in function "class CORE::BigRat __cdecl CORE::content<class
> CORE::BigRat>(class CORE::Polynomial<class CORE::BigRat> const &)"
> (??$content@VBigRat@CORE@@@CORE@@YA?AVBigRat@0@AEBV?$Polynomial@VBigRat@CORE@@@0@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_div
> referenced in function "class CORE::BigRat __cdecl CORE::operator/(class
> CORE::BigRat const &,class CORE::BigRat const &)"
> (??KCORE@@YA?AVBigRat@0@AEBV10@0@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_get_d referenced in function "public: virtual double __cdecl
> CORE::Realbase_for<class CORE::BigRat>::doubleValue(void)const "
> (?doubleValue@?$Realbase_for@VBigRat@CORE@@@CORE@@UEBANXZ)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_get_str referenced in function "public: class
> std::basic_string<char,struct std::char_traits&lt;char>,class
> std::allocator<char> > __cdecl CORE::BigRat::get_str(int)const "
> (?get_str@BigRat@CORE@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_init referenced in function "public: __cdecl
> CORE::BigRat::BigRat(class CORE::BigFloat const &)"
> (??0BigRat@CORE@@QEAA@AEBVBigFloat@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_mul
> referenced in function "public: class CORE::BigRat __cdecl
> CORE::Polynomial<class CORE::BigRat>::eval<class CORE::BigFloat>(class
> CORE::BigFloat const &)const "
> (??$eval@VBigFloat@CORE@@@?$Polynomial@VBigRat@CORE@@@CORE@@QEBA?AVBigRat@1@AEBVBigFloat@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_set
> referenced in function "public: __cdecl CORE::BigRatRep::BigRatRep(class
> CORE::BigRatRep const &)" (??0BigRatRep@CORE@@QEAA@AEBV01@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_set_d referenced in function "public: __cdecl
> CORE::BigRat::BigRat(double)" (??0BigRat@CORE@@QEAA@N@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_set_si referenced in function "public: __cdecl
> CORE::BigRat::BigRat(int)" (??0BigRat@CORE@@QEAA@H@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_set_str referenced in function "public: __cdecl
> CORE::BigRat::BigRat(char const *)" (??0BigRat@CORE@@QEAA@PEBD@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol
> __imp___gmpq_set_z referenced in function "public: __cdecl
> CORE::BigRat::BigRat(class CORE::BigInt const &)"
> (??0BigRat@CORE@@QEAA@AEBVBigInt@1@@Z)
> 1>all_files.obj : error LNK2019: unresolved external symbol __imp___gmpq_sub
> referenced in function "class CORE::BigRat __cdecl CORE::operator-(class
> CORE::BigRat const &,class CORE::BigRat const &)"
> (??GCORE@@YA?AVBigRat@0@AEBV10@0@Z)
> 1>..\..\..\auxiliary\gmp\lib\libmpfr-4.lib : warning LNK4272: library
> machine type 'X86' conflicts with target machine type 'x64'
> 1>..\..\..\auxiliary\gmp\lib\libgmp-10.lib : warning LNK4272: library
> machine type 'X86' conflicts with target machine type 'x64'
> 1>C:\dev\CGAL-4.9.1\build_x64\bin\Release\CGAL_Core-vc140-mt-4.9.1.dll :
> fatal error LNK1120: 50 unresolved externals
> 1>Done building project "CGAL_Core.vcxproj" -- FAILED.
>
> ---------
>
> I'd guess that this happens because the "libgmp-10.dll" and "libmpfr-4.dll"
> are in 32bits, and I can't find 64bits versions of them.
>
> Now I've managed to compile and run the program on Linux, and it works
> perfectly, but I'd still like to get it working on Windows.
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Triangulation-of-points-in-a-4D-Sphere-tp4662712p4662724.html
> Sent from the cgal-discuss mailing list archive at 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
>
>

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