2

I installed a package of Eigen library, following the direction quoted in CMakeLists: C:\Users\HP\Desktop\gop_1.3\external\eigen.

I have in my code this line:

#include<Eigen/Core>
using namespace Eigen;

But when I tried to compile it I got this:

'Erreur 3 error C1083: Impossible d'ouvrir le fichier include : 'Eigen/Core' : No such file or directory C:\Users\HP\Desktop\gop_1.3\lib\util\eigen.h

In addition to that I have many errors in header's program.

Qiu
  • 5,651
  • 10
  • 49
  • 56

1 Answers1

0

Start by creating a minimal example (take one from the Eigen site or roll your own). Eigen is a header library, there is nothing that needs to be precompiled, or linked to, just included. Therefore, you just need make sure that the path is in your project properties (Configuration Properties > VC++ Directories > Include Directories OR Configuration Properties > C/C++ > General > Additional Include Directories). The correct place to check depends on you configuration and if it's machine (in)dependent.

Avi Ginsburg
  • 10,323
  • 3
  • 29
  • 56
  • Thank u very much for your help but i still have the same error when i checked my Additionnal Include Directories i have this C:\Users\HP\Desktop\gop_1.3\examples\..\lib ,i change this directory by rewriting the path of my eigen folder CMakeLists: C:\Users\HP\Desktop\gop_1.3\external\eigen\Eigen – Houayda Gharbi May 26 '15 at 20:35
  • What is the exact path in the include directory? – Avi Ginsburg May 26 '15 at 20:36
  • i checked my Additionnal Include Directories i have this C:\Users\HP\Desktop\gop_1.3\examples\..\lib ,i change this directory by rewriting the path of my eigen folder CMakeLists: C:\Users\HP\Desktop\gop_1.3\external\eigen\Eigen – Houayda Gharbi May 26 '15 at 20:43
  • I don't find the include directory of my project because i just have the incude directory of the Visual studio and i think this is my problem because I downloaded the program and all the files available from the developer's website – Houayda Gharbi May 26 '15 at 20:50
  • If you're using VS2012, you don't need to follow the instructions in the CMake file. Just make sure that the Eigen folder is placed in one of the Included Directories. Also, the directory of the project is included implicitly. – Avi Ginsburg May 27 '15 at 03:30
  • Thank you ;it works but i got another error,error C1083: Impossible d'ouvrir le fichier include : 'cmath' : No such file or directory . i doubt that this error comes from the version of VS that i used or there's another cause? – Houayda Gharbi May 28 '15 at 07:15
  • Follow this answer from [this](http://stackoverflow.com/a/24186973/2899559) question. – Avi Ginsburg May 28 '15 at 07:20