Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!brutus.cs.uiuc.edu!apple!agate!shelby!csli!jkl From: jkl@csli.Stanford.EDU (John Kallen) Newsgroups: comp.lang.c++ Subject: Re: Using C++ lib with regular C code? Keywords: Help Message-ID: <11028@csli.Stanford.EDU> Date: 14 Nov 89 19:24:21 GMT References: <1644@netxcom.DHL.COM> <2204@dataio.Data-IO.COM> Sender: jkl@csli.Stanford.EDU (John Kallen) Reply-To: jkl@csli.stanford.edu (John Kallen) Organization: Center for the Study of Language and Information, Stanford U. Lines: 21 In article <2204@dataio.Data-IO.COM> bright@dataio.Data-IO.COM (Walter Bright) writes: ! !Construct C "wrapper" functions around your C++ code, and then document !the interface as the C interface, as in: ! !extern "C" int func(int a) !{ ! return cppfunc(a); !} I just got ZTC v 2.0 and discovered I had to use the above construct for most all my previously written code in C: type-safe linking forces me to. My question is, (and apologies if this has been discussed before), is this: is this construct a standard? If so, where is it defined? John. _______________________________________________________________________________ | | | | |\ | | /|\ | John K{llen | |\ \|/ \| * |/ | |/| | | PoBox 11215 : HI ." Hello world" ; | |\ /|\ |\ * |\ | | | | Stanford CA 94309 _|_|___|___|____|_\|___|__|__|_jkl@csli.stanford.edu___________________________