Registered Member
|
In VC++ Directories -> Include Directories,I've added
E:\3D Works\Math Tools\eigen-eigen-6e7488e20373 This is the folder where I downloaded and extracted. And now in my .cpp I've add #include <Eigen\Core> But then I got a lot of errors like: 1>c:\program files (x86)\microsoft visual studio 8\vc\include\complex(426) : error C2628: '_Ty' followed by 'double' is illegal (did you forget a ';'?) 1> c:\program files (x86)\microsoft visual studio 8\vc\include\complex(530) : see reference to class template instantiation 'std::_Complex_base<_Ty,_Valbase>' being compiled 1>c:\program files (x86)\microsoft visual studio 8\vc\include\complex(426) : error C2059: syntax error : '<L_TYPE_raw>' 1>c:\program files (x86)\microsoft visual studio 8\vc\include\complex(426) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body 1>c:\program files (x86)\microsoft visual studio 8\vc\include\complex(436) : error C2628: '_Ty' followed by 'double' is illegal (did you forget a ';'?) 1>c:\program files (x86)\microsoft visual studio 8\vc\include\complex(436) : error C2059: syntax error : '<L_TYPE_raw>' ...................................... Please help me, thanks. |
Moderator
|
that's rather strange since the errors appears in the standard complex header... Perhaps you could try two things:
1 - check the c:\program files (x86)\microsoft visual studio 8\vc\include\complex file, especially around lines 426 (you could even paste them here) 2 - try to include <complex> only (without Eigen/Core) |
Registered Member
|
Thanks for your prompt reply, but the problem persists. I've included neither <complex> nor <complex.h>, I simply don't need them. I've never messed with <complex>, and its weird why #include <Eigen\Core> leads to errors in <complex> ?, is there a relationship between them? Is there an install tutorial for windows/MS visual studio? Thanks. |
Moderator
|
<Eigen/Core> has to include <complex>. It does that before including MKL's stuff.
|
Registered Member
|
I found what's wrong. I've already templated real as double in my vector3.h, and this "real" is also been used by <complex>, that's why in <complex> line 426 _Ty real(const _Ty& _Right) it says '_Ty' followed by 'double' is illegal Now I changed real to _real in my vector3.h and everything works correctly. Thanks ggael. P.S I just found Real,scalar,Scalar are all used in Eigen, is there a way to adopt Eigen's Real in my vector3.h? |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]