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

Could not get eigen to work in MSVC 2005, help plz

Tags: None
(comma "," separated)
siciliner
Registered Member
Posts
7
Karma
0
I use eigen 2 and visual studio 2005, i did

include <Eigen/Core>
USING_PART_OF_NAMESPACE_EIGEN
c/c++/general/additional include directories: C:\eigen\Eigen\src\Core


I tried to test a sample code as follows:
int _tmain(int argc, _TCHAR* argv[])
{

Matrix3f m3;
m3 << 1, 2, 3, 4, 5, 6, 7, 8, 9;
Matrix4f m4 = Matrix4f::Identity();
Vector4i v4(1, 2, 3 4);

std::cout << "m3\n" << m3 << "\nm4:\n"
<< m4 << "\nv4:\n" << v4 << std::endl;

std::cout << "My first cpp project." << std::endl;
std::cin.get();
return 0;
}


But it has a fatal error C1083: Cannot open include file: 'Eigen/Core': No such file or directory.

How can i solve it? Plz help me out. Thanks a lot.
renorm
Registered Member
Posts
31
Karma
0
Looks like your Eigen folder is not added to the include list. When you unpack zip file, you get eigen\Eigen folder. Uppercase Eigen is the folder that should be added to the include list.

See this.

http://www.steptools.com/support/stdev_docs/help/settings_vc8.html

In VS2008 (2005 should be similar), you do it for all project in Tools\Options\Projects and Solutions\VC++ Directories.
siciliner
Registered Member
Posts
7
Karma
0
Thanks for your reply, but i did add

Project->Project properties->C/C++->General->Additional Include Directories->C:\eigen\Eigen

Is there anything else I need to do?
renorm
Registered Member
Posts
31
Karma
0
Check if you did it for the same configuration you trying to compile. Or do it globally from Tools\Options\Projects and Solutions\VC++ Directories

There is nothing else you need to do.
siciliner
Registered Member
Posts
7
Karma
0
renorm wrote:Check if you did it for the same configuration you trying to compile. Or do it globally from Tools\Options\Projects and Solutions\VC++ Directories

There is nothing else you need to do.


Thank you very much renorm.

Now I do it globally from Tools\Options\Projects and Solutions\VC++ Directories, add C:\eigen\Eigen, which is where i save the exacted files. But the error is still there.

So,anything wrong with my configuration? Thanks.
manuels
Registered Member
Posts
47
Karma
0
Include just C:\eigen, not c:\eigen\Eigen.

Cheers
renorm
Registered Member
Posts
31
Karma
0
Sorry, eingen must be included, not Eigen. Eigen must be in the folder which is included.
siciliner
Registered Member
Posts
7
Karma
0
Thank you guys very much. It is done now.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient