[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [JDEV] c / c++?
I COULD be wrong, but I BELIEVE that you can link C++ to C by using
directives stating to the C++ compiler to produce C type namespace instead..
What I had to do in order to call the C functions from C++ is to use extern
"C" { #include "common.h" }, and I'd image that there is something simular..
Myself, I LOVE C++..\
--
Thomas Charron
United Parcel Service
Northeast Region
"Moving at the speed of a T3 Trunk Line!"
> -----Original Message-----
> From: owner-jdev@jabber.org [mailto:owner-jdev@jabber.org]On Behalf Of
> Nicholas M. Kirsch
> Sent: Monday, April 19, 1999 1:42 AM
> To: jdev@jabber.org
> Subject: Re: [JDEV] c / c++?
>
>
>
> Traditionally C compilers have trouble linking with C++ libraries. This is
> because C++ allows for function overloading (ie. having foo (void) & foo
> (int) ) and therefore mangles the symbol table.
>
> Not that there isn't a way around it, but have you looked into any ANSI C
> cryptography libraries.. I've played around with a couple that are good.
> Let me look them up and direct you to their sites.
>
> Nick
>
> On Sun, 18 Apr 1999, Jeremie wrote:
>
> > > Hey guys...are we sticking purely with ANSI C, or is the use
> of C++ kosher
> > > at all? (I'm wondering because the Crypto++ toolkit has loads
> and loads of
> > > stuff..but it's all C++...like heavy use of templates and all...like I
> > > think it might not even compile with g++ 2.7.2.x).
> >
> > I'd like to keep the distributed base source straight XP ANSI
> C, but since
> > your stuff will live in mod_digsig, I'm sure we can add all the right
> > conditional wrappers into the header files so that you can
> compile it with
> > a C++ compiler and we'll just link the two together, right? I haven't
> > done much C++ stuff so I don't really know how that might work.
> >
> > mod_digsig could be distributed similiar to how mod_php is for
> Apache, as
> > a seperately compiled external app, and just the .o/.a files are copied
> > into the jabber distro and then linked in. Would this work?
> >
> > Jer
> >
>