0

I'm using Eclipse CDT Kepler and I often got these errors, where the program isn't able to build because of a missing reference - often this is even a std. library like /usr/include/linux/limits.h - but Eclipse does, since [CTRL+Left Mouse Click on the "missing" variable/function/...] leads to the right .h file.

I added the same path and include file for gcc g++ and the linker. But the problem still isn't solved.

Has anyone an idea?

user3085931
  • 1,757
  • 4
  • 29
  • 55
  • It means the search paths for both are different – PlasmaHH Jun 11 '14 at 13:27
  • Is it really that the compiler can't find the header file or do you have undefined references? – jasal Jun 11 '14 at 13:27
  • @PlasmaHH true - but how to make them the same... – doctorlove Jun 11 '14 at 13:30
  • @jasal isn't it the same? the error is: `Error: >>PATH_MAX<< is not declared (first use in this function)` (PATH_MAX is a `#define` in limits.h) oh I forgot afterwards another error appears in the list `Symbol 'PATH_MAX' could not be resolved` – user3085931 Jun 11 '14 at 13:31
  • 1
    @user3085931 No, undefined references occur at the linker stage when it can't find the actual implementation. What you observe are missing declarations. – jasal Jun 11 '14 at 13:36
  • yes you're right, it was a typo here in the comment. – user3085931 Jun 11 '14 at 13:37
  • How have you added the include path for gcc? http://stackoverflow.com/questions/13298550/eclipse-c-including-header-file-from-my-source-folder – doctorlove Jun 11 '14 at 13:51
  • Well I also tried with absolute paths, but the error never changed. – user3085931 Jun 12 '14 at 05:37

0 Answers0