[OpenAFS-devel] Trying to code for Mac OS X

Matt Benjamin matt@linuxbox.com
Wed, 25 Mar 2009 09:28:30 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

To link or export (appropriately defined) C++ free functions with C
linkage you would use:

extern "C" {
 /* C linkage */
}

To facilitate linkage from C++, the C headers perhaps should have:

#ifdef __cplusplus
extern "C" {
#endif

...

#ifdef __cplusplus
} /* extern "C" */
#endif

I don't know if the headers we're including have this.  Of course, it
can be done in the including program.

Matt

Felix Frank wrote:
> 
> This "C++ translation" sounds somewhat abusive. Before furthering your
> current course of action, I'd be interested whether there's a way to
> link C objects into a C++ program. Anyone knowing more C++ than I?
> 
> ...because stripping the code apart to make it compile doesn't sound
> right to me...
> 
> - Felix


- --

Matt Benjamin

The Linux Box
206 South Fifth Ave. Suite 150
Ann Arbor, MI  48104

http://linuxbox.com

tel. 734-761-4689
fax. 734-769-8938
cel. 734-216-5309

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJyjF+JiSUUSaRdSURCC3mAJ4jbxmI2FxJP3Kbx9r9wNQP7sZ6cwCgkM1e
laM+SzNLV7i/Bsqjx+B3QlA=
=6Xig
-----END PGP SIGNATURE-----