Question

The problem might involve using Apple's LLVM 3.1 Compiler and I am sure can be fixed by disabling NEON. However we would like to use NEON.

I am also quite positive this is an error with my setup in XCode but it could be with Apple. Really I'm just reaching out for some tips in the right direction.

/Eigen/src/Core/util/Macros.h
188:Unknown type name 'namespace'
188: Expected ';' after top level declarator

/Eigen/Core
144:'cerrno' file not found

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/3.1/include/arm_neon.h
55: Unknown type name 'float32_t'

This missing float32_t error occurs every instance in that file. Even though line 33 the typedef is clearly done.

UPDATE: If I force #define EIGEN_NO_DEBUG then the only error remaining is the missing cerrno. In fact it appears all the cXXX libs are missing (cstdlib for example). Yet they work if I include them outside of Eigen.

Was it helpful?

Solution

As mentioned in the comments, the issue was that the source code was being compiled as Objective-C instead of Objective-C++. Fixing this fixed the issues.

Specifically caused by a file (main.m) not being renamed to (main.mm). If you are renaming your files to .mm so it used ObjC++ (clang++) then make sure you get them all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top