Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: Birdeeoh on January 28, 2006, 10:51:11 pm
-
Adding syntax highlighting for Objective-C is a simple addition to the current lexer_cpp.xml file and thats great - but what about "full" support for Objective C, namely having Code Blocks realize that a *.m file is a "source" file, not an "other" file?
As it is now I can manually tell codeblocks to compile and link my .m "other" files, one by one. Since the GCC compiler handles both regular C and Obj-C it would simply be a matter of convincing CodeBlocks that .m is a c source file. If there is any easy way to do this, I've missed it... thanks for your help!
-
If there is any easy way to do this, I've missed it...
Yes, you missed it. ;)
Just do a 'right-click' in the 'Management'-window and select 'Edit file types & categories...'. There you can add *.m to the file-endings for source files. ;)
-
Yup, that sure was easy.
Out of curiosity, is/was there a menu option I missed?
I was checking menus and right-clicking on text to try to find an option - never thought to right-click in open space :)
Thanks for your quick help!
-
Out of curiosity, is/was there a menu option I missed?
I was checking menus and right-clicking on text to try to find an option - never thought to right-click in open space :)
Well, there's Project-->Project tree-->Edit filetypes & categories. "Project tree" is the same here as it is in the "Management" right-click menu.
-
Welp, the problem was kinda fixed, but not really. Whether I use the rightclick menu or the project-> menu, I can get *.m classified as source. Great! However, when I add a new *.m to my project it still does not automatically have "compile" and "link" checked. It gets classified as a source file, but is greyed out and not included in my build until I manually check those boxes!
Sorry if I'm asking questions I should be able to figure out... it's just that this is the first "real" IDE I've ever used. I'm from the vi + console windows developer ilk and am just foraying into this full-blown deal so I don't know where I should look. Where I think I should be looking obviously isn't right ;)
Thanks again for the help!
-
Welp, the problem was kinda fixed, but not really. Whether I use the rightclick menu or the project-> menu, I can get *.m classified as source. Great! However, when I add a new *.m to my project it still does not automatically have "compile" and "link" checked. It gets classified as a source file, but is greyed out and not included in my build until I manually check those boxes!
This is actually an issue that has been raised before, although I'm not sure it was really brought to the attention of any of the devs. See, for example, http://forums.codeblocks.org/index.php?topic=1786.msg13399#msg13399 and http://forums.codeblocks.org/index.php?topic=2023.0. I agree with you strongly that the filetypes that default to compileable and linkable should be user-configurable, possibly even from that same "Edit file types & categories" dialog that you just discovered.
Anyone looking for a little project to take on? :lol: (I would try this myself, but my machine runs the compiler so slowly, it's frightening.)