Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!keele!nott-cs!gas From: gas@uk.ac.nott.cs (Alan Shepherd) Newsgroups: comp.lang.c++ Subject: Re: extern "C" Message-ID: <1990Oct15.064326.6878@cs.nott.ac.uk> Date: 15 Oct 90 06:43:26 GMT References: <1990Oct10.062518.23722@cs.nott.ac.uk> <13870@ulysses.att.com> Sender: gas@cs.nott.ac.uk (Alan Shepherd) Reply-To: gas@uk.ac.nott.cs (Alan Shepherd) Organization: Department of Computer Science, Nottingham University Lines: 36 In article <13870@ulysses.att.com>, ggs@ulysses.att.com (Griff Smith) writes: |> In article <1990Oct10.062518.23722@cs.nott.ac.uk>, gas@cs.nott.ac.uk (Alan Shepherd) writes: |> > |> > I've had several responses to my original question about extern "C"... |> > ... However, all the solutions seem to rule out the possibility of using C |> > header files within C++. |> > |> > Alan Shepherd |> |> I'm not sure what you're basing this on, since AT&T C++ 2.0 uses |> standard C header files inside C++ wrappers that discard the useless C |> function definitions. If you have seen this solution and object to the |> aesthetics, so be it. Given that the wrapper would be necessary anyway |> to supply declarations with full type checking, I find it hard to |> quibble about the details. |> -- |> Griff Smith AT&T (Bell Laboratories), Murray Hill My point is that you have to edit the C header files either manually or automatically. In some cases, automatic editing is not trivial. For example, we use the isode OSI development package extensively which is written in old style C and hence the header files require a lot of editing to even be incorporated using extern "C". Since the software producer does not support C++, this has to be done each time a new version is released. Understandably, I would rather not have to do this. Since g++ does not implement extern "C" in the same way and thus it allows inclusion of old-style C headers, I would much rather use it than AT&T's version if it were possible. Unfortunately, we also use some commercial software which rules this choice out. G++ has several other advantages, not least of which is that it is a compiler rather than a translator which greatly facilitates debugging. For the more pecuniary minded, it is also free ! Alan Shepherd