This forum has been archived. All content is frozen. Please use KDE Discuss instead.

In VS2005 I got some compile errors

Tags: None
(comma "," separated)
quaid
Registered Member
Posts
4
Karma
0
OS

In VS2005 I got some compile errors

Sat Mar 17, 2012 9:11 am
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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
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)
quaid
Registered Member
Posts
4
Karma
0
OS
ggael wrote: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)


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.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
<Eigen/Core> has to include <complex>. It does that before including MKL's stuff.
quaid
Registered Member
Posts
4
Karma
0
OS
ggael wrote:<Eigen/Core> has to include <complex>. It does that before including MKL's stuff.


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?


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]