CGAL - MacOS / Xcode installation

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

CGAL - MacOS / Xcode installation

Jan Legleitner
Hello,


i am trying to use cgal in one of my Xcode projects. 

I made many attempts now since the last three days, but i always end up having many compilation errors, which are really hard to understand…


First i installed CGAL as stated here: https://doc.cgal.org/latest/Manual/usage.html by using home-brew:

brew install cgal

which worked perfectly and didn’t show any errors.

As i already set the user search paths to /usr/local/include and /usr/local/lib, i could directly use the CGAL headers in my project.
After trying some basic functions with the library i tried to do follow the surface reconstruction tutorial:


I figured out, that some functions would work and some not, for example:

CGAL::compute_average_spacing<CGAL::Sequential_tag> (points, 6);

would work perfectly with a list of points, but: 

CGAL::jet_smooth_point_set<CGAL::Sequential_tag> (points, 24);

would result in many errors like: “Static_assert failed due to requirement’!(boost::is_same<CGAL::GetSvdTraits…."
or: “No matching function for call to object of type ‘Monge_jet_fitting (aka ‘Monge_via_jet_fitting…..



I followed this tutorial on installing CGAL in Xcode: https://3d.bk.tudelft.nl/ken/en/2016/03/16/using-cgal-and-xcode.html
but since CGAL is header only those libraries don’t exist anymore. 

To solve that problem, I could build CGAL with using cmake and add the missing libraries from that tutorial to my project, but this would not change anything.



If i download the examples folder and try to build with cmake, everything works perfectly. The only problem is,
that i don’t know what is missing for my Xcode project to use CGAL functions.


At the moment i added the following libraries to my Xcode 11.6 project:

- libboost_thread-mt.dylib
- libgmp.10.dylib
- libmpfr.6.dylib


And made the following changed to the project settings:

- Always Search User Paths (Deprecated): YES
- Header search paths: /usr/local/include
- Library Search paths /usr/local/lib /usr/local/Cellar/gmp/6.2.0/lib /usr/local/Cellar/mpfr/4.1.0/lib /usr/local/Cellar/boost/1.73.0/lib
- User header search paths: /usr/local/include


I also already tried to generate a Xcode project with cmake:

cmake -G Xcode <CGAL-5.0.3 path>
which created a Xcode project, but only containing CMakeLists.txt files in each target??
nothing was build and i could also not select any application to run in the settings..
I did not use cmake in the past many times...


I hope this is the right email address and somebody is already using CGAL with Xcode!

Thank you very much!!

best regards
Jan







--
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: CGAL - MacOS / Xcode installation

J. Scheurich



i am trying to use cgal in one of my Xcode projects. 

I made many attempts now since the last three days, but i always end up having many compilation errors, which are really hard to understand…


First i installed CGAL as stated here: https://doc.cgal.org/latest/Manual/usage.html by using home-brew:

brew install cgal

which worked perfectly and didn’t show any errors.

As i already set the user search paths to /usr/local/include and /usr/local/lib, i could directly use the CGAL headers in my project.
After trying some basic functions with the library i tried to do follow the surface reconstruction tutorial:


I figured out, that some functions would work and some not, for example:

CGAL::compute_average_spacing<CGAL::Sequential_tag> (points, 6);

would work perfectly with a list of points, but: 

CGAL::jet_smooth_point_set<CGAL::Sequential_tag> (points, 24);

would result in many errors like: “Static_assert failed due to requirement’!(boost::is_same<CGAL::GetSvdTraits…."
or: “No matching function for call to object of type ‘Monge_jet_fitting (aka ‘Monge_via_jet_fitting…..



I followed this tutorial on installing CGAL in Xcode: https://3d.bk.tudelft.nl/ken/en/2016/03/16/using-cgal-and-xcode.html
but since CGAL is header only those libraries don’t exist anymore. 

To solve that problem, I could build CGAL with using cmake and add the missing libraries from that tutorial to my project, but this would not change anything.



If i download the examples folder and try to build with cmake, everything works perfectly. The only problem is,
that i don’t know what is missing for my Xcode project to use CGAL functions.


CGAL now requies --std=c++14


in the clang commandsline.



--
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: CGAL - MacOS / Xcode installation

Sebastien Loriot (GeometryFactory)
In reply to this post by Jan Legleitner
I guess you are missing Eigen.
http://eigen.tuxfamily.org/index.php?title=Main_Page

If Eigen is not available then the jet function requires you to manually
give a svd traits:

https://doc.cgal.org/latest/Point_set_processing_3/group__PkgPointSetProcessing3Algorithms.html#ga549402c0a8a8b6b71875181e93961521


Best,

Sebastien.

On 8/25/20 2:31 PM, Jan Legleitner wrote:

> Hello,
>
>
> i am trying to use cgal in one of my Xcode projects.
>
> I made many attempts now since the last three days, but i always end up
> having many compilation errors, which are really hard to understand…
>
>
> First i installed CGAL as stated here:
> https://doc.cgal.org/latest/Manual/usage.html by using home-brew:
>
> brew install cgal
>
>
> which worked perfectly and didn’t show any errors.
>
> As i already set the user search paths to /usr/local/include and
> /usr/local/lib, i could directly use the CGAL headers in my project.
> After trying some basic functions with the library i tried to do follow
> the surface reconstruction tutorial:
>
>
> I figured out, that some functions would work and some not, for example:
>
> CGAL::compute_average_spacing<CGAL::Sequential_tag> (points, 6);
>
> would work perfectly with a list of points, but:
>
> CGAL::jet_smooth_point_set<CGAL::Sequential_tag> (points, 24);
>
> would result in many errors like: “Static_assert failed due to
> requirement’!(boost::is_same<CGAL::GetSvdTraits…."
> or: “No matching function for call to object of type ‘Monge_jet_fitting
> (aka ‘Monge_via_jet_fitting…..”
>
>
>
> I followed this tutorial on installing CGAL in Xcode:
> https://3d.bk.tudelft.nl/ken/en/2016/03/16/using-cgal-and-xcode.html
> but since CGAL is header only those libraries don’t exist anymore.
>
> To solve that problem, I could build CGAL with using cmake and add the
> missing libraries from that tutorial to my project, but this would not
> change anything.
>
>
>
> If i download the examples folder and try to build with cmake,
> everything works perfectly. The only problem is,
> that i don’t know what is missing for my Xcode project to use CGAL
> functions.
>
>
> At the moment i added the following libraries to my *Xcode 11.6* project:
>
> - libboost_thread-mt.dylib
> - libgmp.10.dylib
> - libmpfr.6.dylib
>
>
> And made the following changed to the project settings:
>
> - Always Search User Paths (Deprecated): YES
> - Header search paths: /usr/local/include
> - Library Search paths
> /usr/local/lib /usr/local/Cellar/gmp/6.2.0/lib /usr/local/Cellar/mpfr/4.1.0/lib /usr/local/Cellar/boost/1.73.0/lib
> - User header search paths: /usr/local/include
>
>
> I also already tried to generate a Xcode project with cmake:
>
> |cmake -G Xcode<CGAL-5.0.3 path>|
>
> which created a Xcode project, but only containing CMakeLists.txt files
> in each target??
> nothing was build and i could also not select any application to run in
> the settings..
> I did not use cmake in the past many times...
>
>
> I hope this is the right email address and somebody is already using
> CGAL with Xcode!
>
> Thank you very much!!
>
> best regards
> Jan
>
>
>
>
>
>
>
>
> --
> 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: CGAL - MacOS / Xcode installation

Jan Legleitner
Hello Sebastien,

thank you very much for the information.

After i found out how “CGAL_EIGEN3_ENABLED" works, i just needed to include "/usr/local/include/Eigen3“ to the header search paths of Xcode
and now everything works!!! thank you very much!

CGAL searches directly in Eigen/ for headers, but home-brew installs eigen in “Eigen3” i think this is why it did not work at first.

best regards
Jan


> On 26. Aug 2020, at 07:28, Sebastien Loriot (GeometryFactory) ([hidden email] via cgal-discuss Mailing List) <[hidden email]> wrote:
>
> I guess you are missing Eigen.
> http://eigen.tuxfamily.org/index.php?title=Main_Page
>
> If Eigen is not available then the jet function requires you to manually
> give a svd traits:
>
> https://doc.cgal.org/latest/Point_set_processing_3/group__PkgPointSetProcessing3Algorithms.html#ga549402c0a8a8b6b71875181e93961521
>
>
> Best,
>
> Sebastien.
>
> On 8/25/20 2:31 PM, Jan Legleitner wrote:
>> Hello,
>> i am trying to use cgal in one of my Xcode projects.
>> I made many attempts now since the last three days, but i always end up having many compilation errors, which are really hard to understand…
>> First i installed CGAL as stated here: https://doc.cgal.org/latest/Manual/usage.html by using home-brew:
>> brew install cgal
>> which worked perfectly and didn’t show any errors.
>> As i already set the user search paths to /usr/local/include and /usr/local/lib, i could directly use the CGAL headers in my project.
>> After trying some basic functions with the library i tried to do follow the surface reconstruction tutorial:
>> I figured out, that some functions would work and some not, for example:
>> CGAL::compute_average_spacing<CGAL::Sequential_tag> (points, 6);
>> would work perfectly with a list of points, but:
>> CGAL::jet_smooth_point_set<CGAL::Sequential_tag> (points, 24);
>> would result in many errors like: “Static_assert failed due to requirement’!(boost::is_same<CGAL::GetSvdTraits…."
>> or: “No matching function for call to object of type ‘Monge_jet_fitting (aka ‘Monge_via_jet_fitting…..”
>> I followed this tutorial on installing CGAL in Xcode: https://3d.bk.tudelft.nl/ken/en/2016/03/16/using-cgal-and-xcode.html
>> but since CGAL is header only those libraries don’t exist anymore.
>> To solve that problem, I could build CGAL with using cmake and add the missing libraries from that tutorial to my project, but this would not change anything.
>> If i download the examples folder and try to build with cmake, everything works perfectly. The only problem is,
>> that i don’t know what is missing for my Xcode project to use CGAL functions.
>> At the moment i added the following libraries to my *Xcode 11.6* project:
>> - libboost_thread-mt.dylib
>> - libgmp.10.dylib
>> - libmpfr.6.dylib
>> And made the following changed to the project settings:
>> - Always Search User Paths (Deprecated): YES
>> - Header search paths: /usr/local/include
>> - Library Search paths /usr/local/lib /usr/local/Cellar/gmp/6.2.0/lib /usr/local/Cellar/mpfr/4.1.0/lib /usr/local/Cellar/boost/1.73.0/lib
>> - User header search paths: /usr/local/include
>> I also already tried to generate a Xcode project with cmake:
>> |cmake -G Xcode<CGAL-5.0.3 path>|
>> which created a Xcode project, but only containing CMakeLists.txt files in each target??
>> nothing was build and i could also not select any application to run in the settings..
>> I did not use cmake in the past many times...
>> I hope this is the right email address and somebody is already using CGAL with Xcode!
>> Thank you very much!!
>> best regards
>> Jan
>> --
>> 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
>
>


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