Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Bookmarks: difference between C and C++?
Bookmarks: difference between C and C++? [message #185604] Wed, 21 February 2007 13:57 Go to next message
Eclipse UserFriend
Hi,

When using bookmarks,is there a difference between C and C++? I'm able
to set bookmarks in a .cpp or .hpp file, but not in a .c or .h file.

What's the difference?

Best rgds,

--Geert
Re: Bookmarks: difference between C and C++? [message #185612 is a reply to message #185604] Wed, 21 February 2007 14:06 Go to previous messageGo to next message
Eclipse UserFriend
Geert Vancompernolle wrote:
> Hi,
>
> When using bookmarks,is there a difference between C and C++? I'm able
> to set bookmarks in a .cpp or .hpp file, but not in a .c or .h file.
>
> What's the difference?
>
> Best rgds,
>
> --Geert

Same problem is there for the outline: works with .cpp or .hpp, not with
..c or .h files.

Best rgds,

--Geert
Re: Bookmarks: difference between C and C++? [message #185827 is a reply to message #185612] Fri, 23 February 2007 02:14 Go to previous messageGo to next message
Eclipse UserFriend
Geert,

my guess is you have created a Managed Make C++ project. This project type
does not treat .c as source file out of the box (not sure about .h, though).
So when you open a .c file you don't get the C Editor but rather a simple
TextEditor, which does not feed the outline.

Not sure if the text editor supports bookmarks though.

Regards,


Norbert
Re: Bookmarks: difference between C and C++? [message #185925 is a reply to message #185827] Fri, 23 February 2007 13:15 Go to previous messageGo to next message
Eclipse UserFriend
Norbert Ploett wrote:
> Geert,
>
> my guess is you have created a Managed Make C++ project. This project type
> does not treat .c as source file out of the box (not sure about .h, though).
> So when you open a .c file you don't get the C Editor but rather a simple
> TextEditor, which does not feed the outline.
>
> Not sure if the text editor supports bookmarks though.
>
> Regards,
>
>
> Norbert
>
>
>

Well, you're correct Norbert in that it was a standard C++ project. But
the things you mentioned will be equally true for both a managed as well
as a standard C++ project.

It's anyhow weird such project treats .c files differently...

But ok, if that's the case, so be it, isn't it?

Thanks for your response.

Best rgds,

--Geert
Re: Bookmarks: difference between C and C++? [message #187285 is a reply to message #185925] Thu, 08 March 2007 06:02 Go to previous messageGo to next message
Eclipse UserFriend
Hi Geert,

> It's anyhow weird such project treats .c files differently...

this was much-disputed in the mailing list sometime ago. Different usecases
require different solutions ...

> But ok, if that's the case, so be it, isn't it?

You can change the default per project (project properties --> C/C++ File
Types) or per workspace (Window -> Preferences -> C/C++ -> File Types)

Cheers,


Norbert
Re: Bookmarks: difference between C and C++? [message #187346 is a reply to message #187285] Thu, 08 March 2007 14:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brons_eclipsepost.rinspin.com

Norbert Ploett wrote:
>> It's anyhow weird such project treats .c files differently...
>
> this was much-disputed in the mailing list sometime ago. Different usecases
> require different solutions ...

I know a large number of mixed C/C++ projects, and C compatibility was
an important design requirement of C++...

So why would the CDT designers choose to make C++ projects not work with
C files? Baffled,

- Scott
Re: Bookmarks: difference between C and C++? [message #187566 is a reply to message #187346] Thu, 15 March 2007 09:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: deliciap.cradle.com

I too am interested in Scott's question.
Is there any particular reason why CDT decided to treat .c files ONLY as C
sources and not C++ sources?

I have a toolchain based on the MBS.
Is it safe if I have .c files are recognised by both, C & C++ projects?

Thanks,
Delicia.


"Scott Bronson" <brons_eclipsepost@rinspin.com> wrote in message
news:espn29$gc1$1@utils.eclipse.org...
> Norbert Ploett wrote:
>>> It's anyhow weird such project treats .c files differently...
>>
>> this was much-disputed in the mailing list sometime ago. Different
>> usecases
>> require different solutions ...
>
> I know a large number of mixed C/C++ projects, and C compatibility was
> an important design requirement of C++...
>
> So why would the CDT designers choose to make C++ projects not work with
> C files? Baffled,
>
> - Scott
Re: Bookmarks: difference between C and C++? [message #187574 is a reply to message #187566] Thu, 15 March 2007 10:30 Go to previous message
Eclipse UserFriend
At the root of this may be the fact that there are separate parsers for C and
C++. C is not a proper subset of C++ and there were many performance and
correctness issues that were solved when the parser was split in the 3.0 time frame.

-Andrew
Delicia wrote:
> I too am interested in Scott's question.
> Is there any particular reason why CDT decided to treat .c files ONLY as C
> sources and not C++ sources?
>
> I have a toolchain based on the MBS.
> Is it safe if I have .c files are recognised by both, C & C++ projects?
>
> Thanks,
> Delicia.
>
>
> "Scott Bronson" <brons_eclipsepost@rinspin.com> wrote in message
> news:espn29$gc1$1@utils.eclipse.org...
>> Norbert Ploett wrote:
>>>> It's anyhow weird such project treats .c files differently...
>>> this was much-disputed in the mailing list sometime ago. Different
>>> usecases
>>> require different solutions ...
>> I know a large number of mixed C/C++ projects, and C compatibility was
>> an important design requirement of C++...
>>
>> So why would the CDT designers choose to make C++ projects not work with
>> C files? Baffled,
>>
>> - Scott
>
>
Previous Topic:code spanning multiple projects
Next Topic:Crash when debugging a shared library
Goto Forum:
  


Current Time: Thu Nov 06 15:45:23 EST 2025

Powered by FUDForum. Page generated in 0.04513 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top