Cannot find stdlib.h and time.h (other std includes can) Follow
Hello, I am using :
Build #CL-192.5728.100, built on July 23, 2019
Licensed to CLion Evaluator
Expiration date: August 24, 2019
Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Non-Bundled Plugins: com.github.johnthagen.cppcheck
I have cmake project with remote linux compiling machine SUSE 11 sp3 x64.
Project builds successfully, but CLion notifies me that he cannot find stdlib.h and time.h in all their occurancies.
Other includes it sees.
All std includes are exist on a remote linux and I can see them in /usr/include/
I tried add to cmake include_directories(/usr/include) - nothing happens.
According to that, CLion cannot resolve standard functions, but cmake build it.
Invalidate cache/ restart didn't help.
reload cmake, clean cache cmake - didn't help.
How to fix it?
Please sign in to leave a comment.
Hi! Have you tried using Tools | Resync with Remote Hosts?
Hi, it didn't help
Actually, after this command it started to notify me with this messages:
Download from RuRem failed: failed to transfer file '/tmp/tmp.BZVqcpmQBX.tar.gz': could not close the input stream for file "sftp://<ip>/tmp/tmp.BZVqcpmQBX.tar.gz".
Failed to collect files: Could not resolve file "sftp://<ip>/tmp/tmp.RLIcS61UAz.tar.gz". (EOF while reading packet
And this is very uncool.
Server is normal, these messages started after I tried your advice.
after that I run file->invalidate cache / restart.
Now CLion don't see CMakeLists.txt file and can't rebuild project BUT it can reload cmake!
Clean cache and reload cmake project also succeded but CLion still cannot rebuild project because it Cannot find any CMake profile
Это какая-то херня
Фух, закрыл-открыл clion, изменил строку в cmakelists.txt и выбрал reload project.
clion хотя бы подсосал cmakelists.txt.
библиотеки стандартные некоторые все еще не видит clion и их методы соответственно.
Как еще это можно исправить?
Please do the following:
1. Go to File | Settings | Build, Execution, Deployment | Toolchains and delete your remote toolchain.
2. Go to File | Settings | Build, Execution, Deployment | Deployment and delete the related deployment configuration.
3. Close your project (File | Close Project).
4. On the Welcome screen choose New Project > C Executable > Create.
5. In the main.c file add #include <time.h>.
6. Go to File | Settings | Build, Execution, Deployment | Toolchains, create a remote toolchain, make it a default one (it should be on the top of the list).
7. Wait till the project is loaded successfully.
Do you get the error about missing include in this case?
>>Do you get the error about missing include in this case?
> ll /usr/include |grep time.h
-rw-r--r-- 1 root root 13534 May 10 2013 time.h
-rw-r--r-- 1 root root 1603 May 10 2013 utime.h
Do I understand correctly that all the mentioned errors (missing includes, "CLion cannot resolve standard functions") are presented only in the Inspection Results Tool Window? Or do you see them in the editor too?
I see them in editor also.
How to fix it or how to mute highlighting just for special libraries and functions?
Anna Falevskaya, Hello, do you have any idea how to mute this sort of highlight? Is it possible to mute only for one lib, for example?
And may be you can tell me how fix it ?
Could you please run `Tools -> Resync With Remote Hosts` and share idea.log with us.
Please note that log file may contain sensitive information, you can create a ticket (https://youtrack.jetbrains.com/issues/CPP) with a proper description and attach the log-file with `CLion team` visibility.
Thanks in advance.