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

Problems trying to include any Eigen headers in MS VS

Tags: None
(comma "," separated)
Log2
Registered Member
Posts
2
Karma
0
OS
Hi.

I'm doing an OpenGL project for college and sparse matrices became necessary. I've tried using CHOLMOD to solve my problems, but unfortunately it is ridiculously complicated to install that library in Windows, so I just gave up. Now I'm trying to use Eigen and already have Eigen's path in the includes, so linking is fine, but I'm getting a rather strange error when trying to include <Eigen\Sparse>:

Code: Select all
1>------ Build started: Project: Sorkine, Configuration: Debug Win32 ------
1>Build started 24 June 2012 20:34:37.
1>InitializeBuildStatus:
1>  Touching "Debug\Sorkine.unsuccessfulbuild".
1>ClCompile:
1>  main.cpp
1>c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(168): error C2143: syntax error : missing ',' before 'constant'
1>c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(185): error C2143: syntax error : missing ',' before 'constant'
1>c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(186): error C2065: 'InfX' : undeclared identifier
1>c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(186): error C2065: 'SupX' : undeclared identifier
1>c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(186): error C2953: 'Eigen::internal::meta_sqrt' : class template has already been defined
1>          c:\users\leo\desktop\eigen-eigen-6e7488e20373\eigen\src\core\util\meta.h(174) : see declaration of 'Eigen::internal::meta_sqrt'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.06
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I'm currently using Windows 7 and Visual Studio 2011 beta.

Thanks in advance!
Log2
Registered Member
Posts
2
Karma
0
OS
Solved it. It was a conflict with a #define in my code. As soon as I commented it, everything worked.
Waldfee
Registered Member
Posts
7
Karma
0
In case you still need a sparse Cholesky factorization for Windows, then CSparse might be an option. It's fairly easy to compile for Windows.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell