User forums > Using Code::Blocks

How to set .cp extenstion as C++ source file for Codeblocks

(1/2) > >>

I recently installed Codeblocks 20.3 and when I run it, there were four options (I forgot the options  :) :)) and I chose third option. Then all files with these extensions changed their logo and default program to open: .cpp, .cxx, .C, .cc and their logo was like this:-

and my question is... How to make Codeblocks think .cp is C++ extension?

cp is no standard cpp extension...
but if you are on windows you can simply right cklick "open with" set codeblocks as default

But when I set Codeblocks as the default program to open .cp file, it has the logo with codeblocks image, not the logo with c++ logo.
And .cp is a c++ extension as u can see here:

You may think, this extension is only for macOS but it's not! We can still compile .cp files using g++ in cmd.

If you wish to add support of "cp" file extension to CB know places that need work include.


1. Add CP_EXT and CP_DOT_EXT  to filefilters.h and filefilters.cpp
2. Edit FileTypeOf in globals.cpp
3. Edit knownTypes in associations.cpp
4. Edit sc_consts.cpp

Where is this src directory? and before you say this thing, I tried to reinstall code blocks, but now the dialog doesn't appear with the four options. The four options were:-
1. No, leave everything as it is.
2. No, leave everything as it is but ask me again
3. Yes. associate code blocks to all c/c++ source file type
4. Yes, associate code blocks to all supported file type

Now, why is this not appearing?
And how to get the third or fourth option?  ??? ??? ??? ???


[0] Message Index

[#] Next page

Go to full version