How to create a C project with CLion How to create a C project with CLion c c

How to create a C project with CLion


From the CMake file you provided, you can simply delete the CMAKE_CXX_FLAGS line, or perhaps replace it with a C one like this:

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")

The rest of it should be fine, apart from renaming main.cpp to main.c as you said.


Starting with version 2016.3.2 you can choose language (C or C++) and project type (Executable or Library) when creating a new project.

(Though this was in CodeBlocks for example for as long as I remember)) And I still never figured out whether I can create my own "project". Well IMHO CLion clearly sucks in this way if compared to CodeBlocks where I CAN WRITE MY SCRIPT FOR ALMOST EVERYTHING and customize the IDE this way((()

screenshot 1screenshot 2
screenshot 3

https://blog.jetbrains.com/clion/2016/12/clion-2016-3-2-eap/#prj_templates

PS: a screenshot on how to leave a bugreport at https://youtrack.jetbrains.com/issues/CPP
create_issue button