Registered Member
|
Hello,
I am having some compilation problems due to a conflict between boost 1.46 and Eigen 3.0.0 (same behaviour with the dev branch as of today), maybe you guys can help me. I am on Linux using gcc 4.4.0 (the problem doesn't appear on Windows with Visual Studio 2010). So first I got this error:
that corresponds to this code:
I solved that by putting the following before the enum:
I am not sure it's very clean, and I am not sure this one is related to boost so let's continue to the main problem. Similarly to this person (http://stackoverflow.com/questions/5327325/conflict-between-boost-opencv-and-eigen-libraries), I get this:
I don't put the whole output cause it's too long, but it goes on for the following files, with the same error about "anonymous type":
Does anyone know how to solve this? Cheers |
Moderator
|
Hi,
regarding the Success issue you should blame the lib which is defining it as a preprocessor token and I strongly doubt that comes from boost. Regarding the other issues, a short test case would help to reproduce and investigate.... |
Registered Member
|
Hello,
Thanks for your reply. For the boost issue, there isn't really any test case, as the compilation fails on the line where I include the boost header:
I had a look at the lines are indicated by the compiler, in the Eigen file GenericPacketMath.h:293 we find that:
and in the boost file decay.hpp:28
I can't see any relations between those two things, I am quite clueless on this one... |
Registered Member
|
I tried to reproduce but did not manage. I have gcc 4.4.5 and boost 1.46. I tried to compile the following code:
This compiles fine. Do you include any more header files than this? If your compiler gives errors on this code, then perhaps it's a bug in gcc 4.4.0 that's fixed in 4.4.5. |
Registered Member
|
I will try to reduce my code to a minimum size and post an example which fails to compile. I'll post soon!
|
Registered Member
|
Ok I seem to have found it, the following code doesn't compile:
but the following works:
Basically, using the boost::filesystem namespace before including Eigen is the cause of the error. Is there a logical explanation for that? I guess I will have to put them somewhere in a header file in that specific order to be able to compile... |
Moderator
|
You should never put a using namespace declarative before including any header file, just like you should never put any using namespace declarative in header files.
BTW: Your example compiles fine here. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora