Reputation: 2293
I was having a lot of trouble getting code completion to work in QtCreator 3.0.1 on ubuntu 14.04.04LTS.
I went to the QT creator website and downloaded the latest version 3.6.1 and I think I've identified the issue but don't know how to fix it.
To replicate, I go to "File|New file or project|Non-Qt project|Plain C App Then make a test.c file, qmake build system, i leave the "desktop kit" checked, and start.
As you can see here:
It can't find stdio.h
But if I specifically write:
#include "/usr/include/stdio.h" everything works!
The only place i can find an include path to search is in Tools|options|C++|File Naming -> Search paths and /usr/include is already there.
I've tried a C++ blank project just in case it only works for C++ files but it can't find the search path there either. Is there a setting somewhere else that's missing or wrong so I can use the standard naming scheme?
Upvotes: 5
Views: 9046
Reputation: 2293
Ah! Found it. So the "Desktop Kits" for some silly reason never had a compiler selected even though during setup it automatically detected clang. Anyways, when I selected it from the Tools|Options|Build & Run|Kits tab|Desktop (default) and selected the compiler from the pulldown box code completion is working again.
Upvotes: 5