Cannot find the header in C

I have no idea what setting change did I make. It just shows that cannot find the 'stdio.h', and the icon of the file is C++ instead of C. Can someone help me out??? Please!!

 

Thank you so much!

1
4 comments

Hi!  What extension does the file with the C++ icon have? Is everything OK with the toolchains (Settings | Build, Execution, Deployment | Toolchains)? Have you tried to reload project (Tools | CMake | Reset CMake cache and reload project)? How does the contents of your CMakeLists.txt look like?

2

The extension is '.c'. And there is a warning sign at the bottom of toolchains interface, which said ' GDB: current version is Apple LLVM version 9.0.0 (clang -900.0.38); supported version range is 7.8x-7.11x.

Here is what the CMAKELists.txt look like :

set(CMAKE_C_COMPILER gcc)s
cmake_minimum_required(VERSION 3.8)
project(lab6)

set(CMAKE_C_STANDARD 99)

set(SOURCE_FILES main.c)
add_executable(lab6 ${SOURCE_FILES})
0

Please specify the CLion version and insert the screenshot of Preferences | Build, Execution, Deployment | Toolchains.

By the way have you tried using bundled LLDB or GDB? Does the situation remain the same in this case?

0

Xwan and Anna, thank you! I had this issue and that fixed it for me: (Tools | CMake | Reset CMake cache and reload project)

4

Please sign in to leave a comment.