*.C and *.H aren't recognised as C++ files [message #169726] |
Wed, 17 May 2006 06:39  |
Eclipse User |
|
|
|
I can't manage to associate *.C and *.H files to C++ using Eclipse 3.1.2
and CDT 3.0.2.
I have tried to add new global file types under "preferences -> C/C++ ->
file types" (although *.C already exists as a valid C++ source file) and
also tried to define my own project file types under "project ->
properties -> file types -> use project settings", but in both cases when
I create a *.C file clicking file properties informs me that the file is a
C source file, and not a C++ source file as I have defined in file types
configuration.
This bug is keeping me away from using autocompletion in my C++ source
code.
Any help is welcomed.
|
|
|
|
|
|
|
|
|
Re: *.C and *.H aren't recognised as C++ files [message #173488 is a reply to message #170386] |
Fri, 21 July 2006 19:39  |
Eclipse User |
|
|
|
> Jorge Diaz wrote:
>> I think the problem has to be with capital letters in extensions, as
>> CDT mistakes the .C extension treating it as .c and consequently as a
>> C file instead of a C++ file.
>>
>> Anybody having the same problem?
>> Anybody knows the solution?
>>
Anton Leherbauer wrote:
> There is an Eclipse platform limitation about case insensitive content
> types (see also https://bugs.eclipse.org/bugs/show_bug.cgi?id=105022),
> but as long as your CDT project has the C++ Nature, .C files should be
> handled as C++ code, even though the file Properties describe them as "C
> Source File".
>
Henry Luis wrote:
> The released version of CDT won't even build C files in a C++ project.
> Try using Eclipse Callisto and CDT 3.1.0.
>
Hi all,
I can confirm this problem and it's rather a serious problem, as it
prevents the Indexer/Search facility to work correct. It's still there
in the Version released with Eclipse Callisto
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=132201
As you can see from the change log, the bug has been fixed on the
CDT 4.x developement line. I just installed 3.1.0.200607170501
from the tar bundle to be found here:
http://download.eclipse.org/tools/cdt/builds/4.0.0/index.htm l
(Note this is not a "stable" build): The *.C files are still showed as
"C source file" in the properties dialog, but at least F3 ctrl-F3 are
working again, which is a big relief in a project with thousends of files...
Anyway, I would suggest to backport this fix to the stable line
if possible.
Cheers,
Hermann Vosseler
|
|
|
Powered by
FUDForum. Page generated in 0.11130 seconds