Reputation: 1366
I'm trying to compile the Eigen 3 library in an Objective-C++ XCode project (for Mac OSX), and it outputs more than 200 errors, like if it was a linker error. I put a picture below to show the first errors output.
My project is using Objective-C and C++ (a Bullet Physics implem actually) so I
but nothing worked...
The #import
in my program file is working well, as I can see that XCode recognize my
Matrix4f eigenViewMatrix = Map<Matrix4f>(viewMatrix, 4, 4);
I guess there is a flag to add, but I can't find what and where. By the way, I'm using the LLVM GCC 4.2 compiler.
I would be really grateful to receive some help. Thank you.
EDIT
I enabled OpenMP and SSE in the project Build Settings, like in this post : http://forum.kde.org/viewtopic.php?f=74&t=98401
I can't find "auto-vectorization" though.
If I include the
#include <iostream>
#include <Core>
#include <Dense>
in the implementation file (.mm) I have less errors than if it is included in a global header file. The errors only concern Block.h and Memory.h now.
Upvotes: 2
Views: 757
Reputation: 1366
Well, after empiric tests I finally found that Eigen headers calls had to be before everything.
In my Prefix Header (.pch) I had some calls, and so I finally change it like this :
//
// Prefix header for all source files of the 'h[Oz] Bullet' target in the 'h[Oz] Bullet' project
//
#ifdef __OBJC__
#endif
#include <iostream>
#include <Core>
#include <Dense>
#import <Quartz/Quartz.h>
#import <OpenGL/CGLMacro.h>
#import <OpenGL/gluMacro.h>
Hope it'll help someone.
Upvotes: 2