Nifti files in OF (can't compile)

I’m trying to include eigen in an xcode project. So far i installed eigen:

brew install eigen

and set the header paths in the project file like so:


now the library is found and starting to compile.
But I get many errors:

/usr/local/Cellar/eigen/3.2.1/include/eigen3/Eigen/src/Core/Block.h:50:15: Use of undeclared identifier 'Block'; did you mean 'clock'?
/usr/local/Cellar/eigen/3.2.1/include/eigen3/Eigen/src/Core/Block.h:50:21: 'XprType' does not refer to a value
/usr/local/Cellar/eigen/3.2.1/include/eigen3/Eigen/src/Core/Block.h:50:8: Explicit specialization of non-template struct 'traits'
/usr/local/Cellar/eigen/3.2.1/include/eigen3/Eigen/src/Core/Block.h:50:64: Expected unqualified-id

To me this seems to be a dialect problem.
Any ideas what I can try to fix it?


Ok i got through that error. the problem was that I set the paths as recursive. they must be non recursive. Eigen is Ok now.

Now new errors that look like syntactical issues in other files outside of eigen:

NiftiImage.cpp:11:30: Expected ';' at end of declaration

the syntax is the following:

static const StringMap Units        <----- error here
	{ NIFTI_UNITS_MM,     "mm" },

any ideas what is going on? is it c++11?

Ok in fact it seems that the code it is in c++11.
when i change the flag C++Standard Library from:
libstdc++ (GNU C++ standard library)
libc++ (LLVM c++ standard libarary with C++11 support)
then the errors disappear and the famous “tr1/mememory” error appears.

Is there any way of running c++11 code in our current OF? can i compile it sepparatelly using c++11 and link it as an object? will that work?

Not currently on OSX that I know of, but it’s coming soon … we’re recompiling all libs to support libc++ for 64bit. 0.9.0 will have it, according to plan.

I believe you should be able to use C++11 features on linux already though using master branch.

Thanks @bakercp will wait for the 0.9 then
I don’t see other ways around it :confused: