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

MSVC 2005 compilation. Need help

Tags: None
(comma "," separated)
ddd123
Registered Member
Posts
3
Karma
0

MSVC 2005 compilation. Need help

Sat Dec 12, 2009 12:04 pm
Sorry for asking stupid questions, but I can't understand one thing.
I wrote a sample program like this:
Code: Select all
#include <iostream>
#include <Eigen/Core>

int main(int, char *[])
{
  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;
}

I've set up the path to Eigen folder in project settings, it's OK.
When I try to build, i get the following message:
Code: Select all
fatal error C1083: Cannot open include file: 'Eigen/Core': No such file or directory

Please, help to overcome this trouble.
Hauke
Registered Member
Posts
109
Karma
3
OS

Re: MSVC 2005 compilation. Need help

Sat Dec 12, 2009 12:17 pm
Please paste exactly what you have configured in C/C++ -> General -> Additional Include Directories (assuming you are on VS.net).

- Hauke
ddd123
Registered Member
Posts
3
Karma
0

Re: MSVC 2005 compilation. Need help

Sat Dec 12, 2009 12:28 pm
I have the following directory structure:
Code: Select all
<ProjectsFolder>\cloud_analysis\point_cloud_mapping\ - root folder of the project
<ProjectsFolder>\cloud_analysis\point_cloud_mapping\include - place of Eigen folder
<ProjectsFolder>\cloud_analysis\point_cloud_mapping\include\Eigen\Core - here are all the headers


So, i use the following enty in C/C++ -> General -> Additional Include Directories:
Code: Select all
./include/


It seems to be OK, 'cause if i put a "sample.h" into include\Eigen\Core and write
Code: Select all
#include <Eigen/Core/sample.h>

I get no errors regarding the header path.
Hauke
Registered Member
Posts
109
Karma
3
OS
I am confused about your Eigen folder structure...

It should be like this

Directories:

include/Eigen/
include/Eigen/src

Files:

include/Eigen/Array
include/Eigen/Cholesky
include/Eigen/Core
... many more


There is only one core directory at

include/Eigen/src/Core

i.e. you can hardly put a file to

include/Eigen/Core/sample.h

since Core should be a file.

Please double check your Eigen structure. There is a Eigen root directory containting files like COPYING.GPL and COPYING.LGPL - your include should point to that folder.

- Hauke
ddd123
Registered Member
Posts
3
Karma
0
Thanx a lot! It's evident, that last night i've copied a src sub-folder with files instead of Eigen folder.


Bookmarks



Who is online

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