Reputation: 817
Earlier I asked for help in including an external library called Eigen in xcode 4. I finally managed to get it to include the header file I wanted to use, Array, by going to build phases, link binary with libraries, and then adding the sub-folder within the Eigen archive where Array.h was located, Core. I also added the filepath to Core's parent directory, src, in header search paths.
When I finally managed to add the line of code #include <Core/Array.h>
without it getting highlighted as an error, I ran the application (which worked previously) and XCode said that the build failed, with the error messages citing semantic issues. I checked the error message and they include, "Uknown identifier 'Array'" in a file named Array.h.
All of the header files are in src and according to the Eigen website, they are all that's needed to use Eigen with c++. I've attempted to reformat the binary links so they go to src instead of Core, and adjusting the buildpath to lead to the parent directory of src, ensuring that all header files can now be accessed, but I'm still getting semantics issues. Does anyone have a solution to this?
Upvotes: 0
Views: 63
Reputation: 10596
You generally want to include the Core
file, not the individual .h
files, i.e.
#include <Eigen/Core>
There are exceptions, but again, you won't be including the .h
files, those are used internally. Additionally, it appears that your include path points to the ./Eigen/src/
directory. You want to move it up two directories so that when you write #include <Eigen/Core>
it finds the Core
file correctly. The files that you'll most likely include are the extension-less ones in the Eigen directory.
Upvotes: 1