Getting Error "/usr/include/limits.h:123:16: fatal error: 'limits.h' file not found"
sittim opened this issue · comments
Hi,
I am getting this error:
/usr/include/limits.h:123:16: fatal error: 'limits.h' file not found
every time I save the file. But when I execute the same file in terminal, there is no errors, so:
$ clang --analyze -I/work/c1202-firmware/ -I/work/c1202-firmware/gmock/include/ -I/work/c1202-firmware/gmock/gtest/include dispat_tasks_test.cpp
Produces no errors, but running it on ST3 Produces an error.
Is this a C or Cpp project?
If its the latter, have you tried including <climits>
instead?
Are you including limits.h
in your project or indirectly through the system?
Also make sure "-isystem", "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
is in your cc.sublime-settings file or project-specific configuration.
# include_next <limits.h>
at /usr/include/limits.h
:123.
you should add gcc include-fixed
path or clang include
path in cc.sublime-settings
file or your <project_name>.sublime_project
.
my config as follow:
"-isystem", "/usr/include",
"-isystem", "/usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed",
"-isystem", "/usr/lib/llvm-3.5/lib/clang/3.5.0/include/",
Falven,
It is Cpp and it is on Ubuntu. I am running Google Gmock Framework, I am not allowed to edit their code, so cannot change from limits.h
to <climits>
.
Ivzixun,
Thank you, adding the paths to the project file worked.
This really makes me wonder, why do I need the file includes in ST3 and do not need them when I run in command prompt?
I think that clang set include directory
option when the runtime.
But clang-complete
plugin using libclang.so
, unable to know the default clang include directory
path. so, need to add "-isystem", "/usr/lib/llvm-3.5/lib/clang/3.5.0/include/",
option.
Understand, than you...