Registered Member
|
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. |
Registered Member
|
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. |
Registered Member
|
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? |
Registered Member
|
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. |
Registered Member
|
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. |
Registered Member
|
Include just C:\eigen, not c:\eigen\Eigen.
Cheers |
Registered Member
|
Sorry, eingen must be included, not Eigen. Eigen must be in the folder which is included.
|
Registered Member
|
Thank you guys very much. It is done now.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient