qtcreator can't find stdio.h
-
Hello I just started to use qtcreator I just wrote simple code that had
#include <stdio.h>
but qtcreator saysa.c:1:10: error: 'stdio.h' file not found
is /usr/include not in default include directories? if It's not how I can add /usr/include default include directory?Note; I just want open file and edit. Not like big project so I don't want to create project for every file what I open.
-
Hi and welcome to devnet,
How are you building your project ?
Even small projects can have a project file. That makes things easier. -
I just type
gcc a.c
to terminal and it happens. I don't want to use qtcreator for build it. -
Then you should rather ask that on your distribution forum.
Your issue is completely unrelated to Qt.
Anyway, what you can do is add -I/usr/include to your gcc call but AFAIK, it should not be required.
-
Sorry looks I explained wrong. I mean that error comes from qtcreator. Not from gcc or anything build related.
-
So it's the code model that's not happy as it seems.
What version of Qt Creator are you using ?
How did you installed it ? -
I downloaded It from arch extra/qtcreator
archlinux.org/packages/extra/x86_64/qtcreatorqtcreator -version
Qt Creator 4.12.4 based on Qt 5.15.0 Android 4.12.4 Support for deployment to and execution on Android Devices. AutoTest 4.12.4 Auto Test plugin. AutotoolsProjectManager 4.12.4 Autotools project integration. BareMetal 4.12.4 This plugin adds a target for bare metal development. Bazaar 4.12.4 Bazaar integration. Beautifier 4.12.4 Format source files with the help of beautifiers like AStyle, uncrustify or clang-format. BinEditor 4.12.4 Binary editor component. Bookmarks 4.12.4 Bookmarks in text editors. Boot2Qt 4.12.4 Support for the Boot2Qt Device access using the Qt Debug Bridge. CMakeProjectManager 4.12.4 CMake support. CVS 4.12.4 CVS integration. ClangCodeModel 4.12.4 Clang Code Model plugin. ClangFormat 4.12.4 clang-format indentation plugin. ClangPchManager 4.12.4 Clang precompiled header plugin. ClangRefactoring 4.12.4 Clang Refactoring plugin. ClangTools 4.12.4 ClangTools Plugin. ClassView 4.12.4 Class View component. ClearCase 4.12.4 ClearCase integration. CodePaster 4.12.4 Codepaster plugin for pushing/fetching diff from server. CompilationDatabaseProjectManager 4.12.4 Compilation Database project support. Core 4.12.4 The core plugin for the Qt IDE. CppEditor 4.12.4 C/C++ editor component. CppTools 4.12.4 Tools for analyzing C/C++ code. Cppcheck 4.12.4 Cppcheck static analyzer tool integration. See http://cppcheck.sourceforge.net. CtfVisualizer 4.12.4 Chrome Trace Format Visualizer Plugin. Debugger 4.12.4 Debugger integration. Designer 4.12.4 Qt Designer integration. DiffEditor 4.12.4 Diff editor component. EmacsKeys 4.12.4 The main idea behind this plugin is to provide additional actions a typical emacs user would expect. It doesn't claim to provide full emacs emulation. The following actions are available: - Movement [C-f, C-b, C-n, C-p, M-f, M-b, C-a, C-e, M-<, M->] - Mark-based selection [C-SPC, C-x C-x] - Cut/copy/yank (doesn't provide kill ring feature) [M-w, C-w, C-y] - Kill actions, which interact properly with clipboard [C-k, M-d, C-d] - Scrolling (half of the screen, keeps cursor visible) [C-v, M-v] - Insert new line and indent [C-j] IMPORTANT: Actions are not bound to any key combinations by default. You can find them under 'EmacsKeys' section in keyboard shortcuts settings. Also it's worth mentioning that EmacsKeys plugin forces disabling of menu mnemonics by calling Qt's qt_set_sequence_auto_mnemonic function with false argument. Many of the english menu mnemonics get into the way of typical emacs keys, this includes: Alt+F (File), Alt+B (Build), Alt+W (Window). It's a temporary solution, it remains until there is a better one. FakeVim 4.12.4 VI-style keyboard navigation. GLSLEditor 4.12.4 Editor for GLSL. GenericProjectManager 4.12.4 Generic support. Git 4.12.4 Git integration. HelloWorld 4.12.4 Hello World sample plugin. Help 4.12.4 Help system. ImageViewer 4.12.4 Image Viewer component. Ios 4.12.4 Support for deployment to and execution on iOS Devices. LanguageClient 4.12.4 Language Server Protocol client component. See https://microsoft.github.io/language-server-protocol/overview for an overview on Language Servers. Macros 4.12.4 Macros in text editors. Marketplace 4.12.4 Qt Marketplace plugin. McuSupport 4.12.4 Helper for MCU related projects. Mercurial 4.12.4 Mercurial integration. ModelEditor 4.12.4 Graphical modeling with structured diagrams. Nim 4.12.4 Plugin for supporting the Nim programming language. PerfProfiler 4.12.4 Perf Profiler Plugin. Perforce 4.12.4 Perforce integration. ProjectExplorer 4.12.4 ProjectExplorer framework that can be extended with different kind of project types. Python 4.12.4 Plugin for supporting the Python language. QbsProjectManager 4.12.4 QBS support. QmakeProjectManager 4.12.4 Provides project type for Qt/QMake .pro files and tools. QmlDesigner 4.12.4 Visual Designer for QML files. QmlJSEditor 4.12.4 Editor for QML and JavaScript. QmlJSTools 4.12.4 Tools for analyzing Qml/JS code. QmlPreview 4.12.4 Qml Preview Plugin. QmlProfiler 4.12.4 Qml Profiler Plugin. QmlProjectManager 4.12.4 Qt Quick support Qnx 4.12.4 Adds support for QNX to Qt Creator. QtSupport 4.12.4 Provides support code for build systems. RemoteLinux 4.12.4 Support for deployment to and execution on a remote Linux host. ResourceEditor 4.12.4 Editor for qrc files. ScxmlEditor 4.12.4 Visual Editor for SCXML (State Chart XML) files. SilverSearcher 4.12.4 Adds possibility to use SilverSearcher tool as an alternative mechanism of find in files StudioWelcome 4.12.4 Qt Design Studio Welcome Page. Subversion 4.12.4 Subversion integration. TaskList 4.12.4 Use .tasks-files to populate the Issues view. TextEditor 4.12.4 Text editor framework and the implementation of the basic text editor. Todo 4.12.4 Adds pane that lists all TODO, FIXME, etc. entries in comments. UpdateInfo 4.12.4 Displays Update-Infos for Qt Installer Framework-based Updaters. Valgrind 4.12.4 Valgrind Plugin. VcsBase 4.12.4 Version Control System Base Plugin. WebAssembly 4.12.4 Helper for WebAssembly projects. Welcome 4.12.4 Secondary Welcome Screen Plugin. WinRt 4.12.4 Helper for Windows Runtime projects. (C) 2020 The Qt Company Ltd