mhmmm
logging the stderr in a file the first error is:
In file included from /usr/local/include/eigen3/Eigen/Core:250,
from /usr/local/include/eigen3/Eigen/Dense:1,
from src/testApp.cpp:4:
/usr/local/include/eigen3/Eigen/src/Core/util/Constants.h:375: error: #error The preprocessor symbol 'Success' is defined, possibly by the X11 header file X.h
EDIT:
and, yeah, inside an openframeworks empty example setuo the code:
cout << Sucess << endl;
print out a 0
: (
what can be done for resolve this? mayebe a namespace trick?
Apparently this is a known problem and I would blame it on X11 who have a non-capital constant defined (Success). Does anybody know of a cleaner workaround? It gets complicated to apply it on bigger projects. I’ve added
#else // normal linux
#include <GL/glew.h>
#include <GL/gl.h>
#include <GL/glx.h>
//Eigen has an enum that clashes with X11 Success define, which is ultimately included by pcl
#ifdef Success
#undef Success
#endif
#endif
#include “…Eigen/whatever…” #undef Success #other includes
So first I would include Eigen and then everything else. Eigen3 is a header-only library so it seems cleaner this way because X11 is not header-only and you might mess it up more the other way around I feel…
But to be honest both methods are bad - especially since I am not even using eigen3 by myself, just using soemthing that uses eigen3…