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

Problem in compiling Eigen with Visual Studio 2008

Tags: None
(comma "," separated)
castellfr
Registered Member
Posts
4
Karma
0
Hello, I'm trying to use Eigen 2.0.10 in my project developed in Visual Studio 2008 Express Edition and I cannot compile it.

When I include all the files of Eigen folders in a very simple test hello world win32 console application like this:


#include<iostream>
#include "Eigen/Core"

using namespace std;

void main()
{
cout<<"ciao"<<endl;
Eigen::VectorXd v(3);
}

it does not compile. I get the Compiler Error C2948, for 9 times in the file:
eigen\src\core\coreinstantiations.cpp(41) : error C2948: explicit instantiation; storage class specifier 'static' not permitted on specialization

Does anybody have already encountered this problem?
And let me know if you need more information to understand this problem, thanks a lot
Francesco
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Hi,

you should not include Eigen's file in your project. Eigen is a pure template library, the .cpp files contained in the src/ directory are not needed and deprecated.

In your own .cpp files you only #include <Eigen/Core> (or other modules), and MSVC only has to know where the Eigen/ folder is.
castellfr
Registered Member
Posts
4
Karma
0
Great, it works! Sorry you had to waste time on my ignorance =)
Francesco


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]