Search code examples
xcodecgaleigen3

Xcode unable to find Eigen in workspace


I'm working on Xcode 7.0.1. I'm working with CGAL 4.7. I have a mesh that I want to refine using fair() and refine() as shown in this example.

I initially copied the code and ran it in Xcode and it gave me this error:

/Users/.../Desktop/CGAL-4.7/include/CGAL/Polygon_mesh_processing/fair.h:133:5: Static_assert failed "The function fair requires Eigen3 version 3.2 or later."

Subsequently, I added usr/local/Cellar/eigen/3.2.6/lib and usr/local/Cellar/eigen/3.2.6/include/eigen to Library Search Path and Header Search Path. Eigen is working, I run some sample code to test. But, I'm still getting that error.


Solution

  • As documented here you can set the environment variable EIGEN3_INC_DIR to the directory contain the Eigen directory containing the header files before running CMake.