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

Geometry package of Eigen2 incompatible with VS 2008?

Tags: None
(comma "," separated)
Nasenbaer
Registered Member
Posts
2
Karma
0
OS
Hi,
I tried to use the Geometry package of Eigen2 with a Visual Studio 2008 project but I get errors.

The code:
Code: Select all
#include <Eigen/Geometry>
using namespace Eigen;

int main()
{
  Transform t;
  t = AngleAxis(3.0f, Vector3f(1.0f, 0.0f, 0.0f));
}



The error:
error C2955: 'Eigen::Transform' : use of class template requires template argument list
error C2133: 't' : unknown size
error C2512: 'Eigen::Transform' : no appropriate default constructor available
error C2955: 'Eigen::AngleAxis' : use of class template requires template argument list


My code snippet is the intro example of the Geometry docs.

Has anyone a suggestion? :)
User avatar
bjacob
Registered Member
Posts
658
Karma
3
There's a typo in our docs. Transform is a template indeed. You need to pass template parameters to it, or to use one of our standard typedefs such as Transform3f.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!
Nasenbaer
Registered Member
Posts
2
Karma
0
OS
bjacob wrote:There's a typo in our docs. Transform is a template indeed. You need to pass template parameters to it, or to use one of our standard typedefs such as Transform3f.

Phew! I already thought it's not compatible. Then there is also another typo:
I have to use AngleAxisf.

But this code works now:
Code: Select all
Transform3f trans;
trans = AngleAxisf(1.0f, Vector3f(0.0f, 1.0f, 0.0f));


Thx for the help! Problem solved. :D


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]