Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: rajin100000 on April 30, 2021, 06:51:44 pm
-
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:-
(https://i.postimg.cc/BtrNSQB8/Codeblocks.png) (https://postimg.cc/BtrNSQB8)
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:
(https://i.postimg.cc/Wh9KbQqy/codeblocks1.png) (https://postimg.cc/Wh9KbQqy)
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.
src/include/filefilters.h
src/sdk/filefilters.cpp
src/sdk/globals.cpp
src/sdk/scripting/bindings/sc_consts.cpp
src/src/associations.cpp
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? ??? ??? ??? ???
-
So, you have no idea on how to build your own copy of Code::Blocks; then, you have no way to fix the problem.
Edit: Link to wiki that may help you to learn how to build Code::Blocks https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows (https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows)
Tim S.