Hi,
The F11 shortcut let you switch from a *.c/*.cpp to a *.h.
But if the corresponding *.c/*.cpp/*.h doesn't exists, it proposes to create it.
The problem is:
I am in a C project.
I create a *.h file, e.g. array.h.
I then press F11.
array.c/cpp doesn't exists, so it propose me to create it.
But it creates array.CPP, while I am in a C project!
And it is not just the extension: the file is considered in all aspects as a c++ file (in the *.cbp, CompilerVar= CPP and not CC, etc..)
Thanks for correcting this bug!
P.S: In case this is the desired comportement, a toolbox with the option to choose between C/C++ would be appreciated.
Thanks!
And another one... please follow the forum rules and state a version of CB, OS, compiler :? :lol:
BTW, If you're using 8.02 you can try a nigthly.... there were some problems in C handling in the past
Oops, sorry!
Codeblocks SVN 6181
OS: Kubuntu 9.10 32bits
Compiler: gcc (Ubuntu 4.4.1-4ubuntu8) 4.4.1
Anyone?
I suppose this is just a bug, c::b is used mostly as c++ ide...
You can submit a bug report at the berlios.de page and wait to be fixed...
Quote from: Loumnam on March 26, 2010, 12:54:34 PM
But it creates array.CPP, while I am in a C project!
There is no such thing like a C
project. All projects are C/C++. However, to create the right file for you (with an extension
.c) why don't you simply name the
full file name, including the extension as you need, like "blah.
c"?!
*.h files are also valid for C++, so the IDE cannot know what exactly you want to do (unless you tell by the file extension yourself).
Quote from: MortenMacFly on April 11, 2010, 08:07:50 PM
There is no such thing like a C project. All projects are C/C++. However, to create the right file for you (with an extension .c) why don't you simply name the full file name, including the extension as you need, like "blah.c"?!
*.h files are also valid for C++, so the IDE cannot know what exactly you want to do (unless you tell by the file extension yourself).
Yes but hitting f11 in a header (blah.h) doesn't ask you if you want to create .cpp or .c, it always creates blah.cpp file.
Quote from: oBFusCATed on April 11, 2010, 08:11:28 PM
Yes but hitting f11 in a header (blah.h) doesn't ask you if you want to create .cpp or .c, it always creates blah.cpp file.
Not for me :-)
But I recall that I did some modifications in that part of C::B literally ages ago... probably I did that already and forgot to submit... I need to check...