Page 1 of 1

How do I create a C-only project?

Posted: Fri Dec 01, 2023 4:37 am
by teovilo

Codelite is one of the few lightweight IDE's for Windows but I'm frustrated that it treats C as a second class language. Despite advertising as a C/C++ IDE, there is only an option to create C++ projects. Obviously you can add C source/header files to a C++ project however, using "Add new file" defaults to *.cpp file names.

When compiling one of these projects, the g++ compiler is invoked even though it's not needed for a C-only project. I haven't found a way to disable this.

Is it possible to create a C-only workspace?


Re: How do I create a C-only project?

Posted: Fri Dec 01, 2023 12:04 pm
by eranif

You can simply rename the file to .c , by doing so, the compiler invoked will be gcc and not g++
Once renamed, you can right click and save the project as a template for future use


Re: How do I create a C-only project?

Posted: Fri Dec 01, 2023 3:33 pm
by teovilo

Thanks for the reply eranif. I tried your solution and it has the same behaviour. G++ is still invoked during the linking stage. For a C-only project, it should be handled by GCC only. Furthermore, adding a new file to the templated project still defaults to *.cpp. This is not a user friendly way to use Codelite as a C IDE.

Is there a way to use Codelite with first-class support for C without treating as a subset of C++? Can I create my own Workspace template?