Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: bronek77 on July 14, 2006, 01:08:39 pm

Title: treating *.scc files as source files
Post by: bronek77 on July 14, 2006, 01:08:39 pm
Hi
I have a question - or a feature request ;)
I want to treat *.scc files as source files - I have a project, where I have both *.cc and *.scc files. I can't change the extensions - all the files are in the repository, and other developers work on them. I would like to treat them (*.scc files, not the developers ;) ) as normal source files.  Is there any way to do this in the last version of Code::Blocks ?  If not - maybe it would be a nice feature to add to the IDE ;)
best regards
bronek77
Title: Re: treating *.scc files as source files
Post by: kidmosey on July 14, 2006, 01:51:55 pm
I think this may already be an option (if I understand what you are asking).

In the latest build:

go to Settings->Editor->Syntax highlighting and add *.scc,*.cc to the list of filemasks for C/C++ (*.cc is already there in mine)

In addition, you may need to click the properties for the files and check the boxes for "compile" and "link".

I think that will do the trick, although I haven't tested it (and I've only been using C::B for a few weeks).

Options for RC2 are similar, but I don't recall the exact names of the menus.
Title: Re: treating *.scc files as source files
Post by: bronek77 on July 17, 2006, 09:10:54 am
I have RC2 and I don't have an option do edit filemask of C++ files :(  (at least not in the editor settings)
but thans for your answer anyway :)
Title: Re: treating *.scc files as source files
Post by: kidmosey on July 17, 2006, 10:51:22 am
Okay, try this, then. (Assuming you are using gcc/mingw)

Project->Build Options->Compiler->Other Options:
-x "c++"

This specifies that the files are all CPP.

Now you will still need to check the properties on each *.scc file and check the boxes for linking and compiling.

If you are using a different compiler, check the docs to see if it will allow you to specify which language you are compiling with.
Title: Re: treating *.scc files as source files
Post by: bronek77 on July 17, 2006, 12:48:03 pm
Hi
Compiler treats this files as c++ source (I have set it) but unfortunately the editor does not - I don't have syntax highlighthing.
Title: Re: treating *.scc files as source files
Post by: Pecan on July 17, 2006, 12:50:53 pm
Hi
Compiler treats this files as c++ source (I have set it) but unfortunately the editor does not - I don't have syntax highlighthing.

Is there any possiblility that  you could switch to a nightly build.
It could solve all these problems.


http://forums.codeblocks.org/index.php?board=20.0
 (http://forums.codeblocks.org/index.php?board=20.0)