How to create a C project with CLion
If you create a new project on CLion, it will be a C++ project.
If you want a C project, for the moment (2 years ago that users are asking the same to JetBrains here) you will need to edit CMakeLists.txt file:
replace:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
by:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
set(SOURCE_FILES main.c)
Now, rename your main.cpp to main.c
Enjoy it!
Remember CLion (Jetbrains suite) it's free for students
If you want a C project, for the moment (2 years ago that users are asking the same to JetBrains here) you will need to edit CMakeLists.txt file:
replace:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
by:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
set(SOURCE_FILES main.c)
Enjoy it!
Remember CLion (Jetbrains suite) it's free for students
Free for students: Professional developer tools from JetBrains https://t.co/L8bxXBhwXA— Nicolás Boettcher (@nicoboettcher) October 4, 2016
I enjoy student life @clion_ide pic.twitter.com/CxMNoW6cmg— Nicolás Boettcher (@nicoboettcher) October 4, 2016
Comments
Post a Comment