The only tangible difference between selecting C vs C++ when you create a project is which compiler is invoked for the translation units during a build. Code::Blocks currently does not provide a way to directly change this after project creation. That is to say you would have to change each source file one at a time to get what you want.
Here's what you can do to change it:
Now if your existing project contains a lot of source files you can do this quicker by manually editing the Code::Blocks .cbp
project file (it's just an XML file). The nodes you want to search for and replace will look something like this:
<CodeBlocks_project_file>
<!-- ... -->
<Project>
<!-- ... -->
<Unit filename="source1.cpp">
<Option compilerVar="CPP" /> <!-- Change CPP to CC here -->
</Unit>
<Unit filename="source2.cpp">
<Option compilerVar="CPP" /> <!-- And here -->
</Unit>
<Unit filename="source3.cpp">
<Option compilerVar="CPP" /> <!-- And here then save. -->
</Unit>
<!-- ... -->
</Project>
</CodeBlocks_project_file>
After the changes, open your project in Code::Blocks and confirm it's being compiled as a C source file. You should see the build log invoking gcc
now instead of g++
.