0

I am trying to compile a code that has a include directory with some header files in it. One header file is referenced as:

#include <include/A/example.h>

In one of the files. I also have added the correct path of the folder that has example.h in the Eclipse: Project -> Properties -> Includes

However I get this error when I try to build:

fatal error: home/TJ/workspace/myProject/include/A/example.h: No such file or directory

Does anybody know why I get this error?

Thanks

valiano
  • 16,433
  • 7
  • 64
  • 79
TJ1
  • 7,578
  • 19
  • 76
  • 119

1 Answers1

0

Have you added the directory /home/TJ/workspace/myProject to the path, and not something else, such as home/TJ/workspace/myProject (note the missing leading slash) or /home/TJ/workspace/myProject/include/A?

Also, remember that <> in the #include directive means standard include files, so maybe you should use ""?

Thomas Padron-McCarthy
  • 27,232
  • 8
  • 51
  • 75
  • Yes I have added /home/TJ/workspace/myProject to the path., and changing <> to "" does not have any effect. – TJ1 Jun 20 '12 at 06:42
  • And the file example.h is in the include/A subdirectory? And no mistakes with uppercase and lowercase somewhere? And no spaces inserted somewhere? – Thomas Padron-McCarthy Jun 20 '12 at 06:53
  • yes to all. This is on Linux, is there anything different on Linux? – TJ1 Jun 20 '12 at 07:02