Re: C headers lack extern "C" {} wrapping
- From: Darin Adler <darin bentspoon com>
- To: Sam Couter <scouter bigpond net au>,ORBit list <orbit-list gnome org>
- Subject: Re: C headers lack extern "C" {} wrapping
- Date: Sat, 23 Feb 2002 00:19:00 -0800
On 2/22/02 11:31 PM, "Sam Couter" <scouter@bigpond.net.au> wrote:
> None of the C headers in ORBit2 (except those generated by the IDL
> compiler) have the 'extern "C" {}' wrapping. This means that the
> functions declared in those header files aren't accessible from C++
> code.
>
> Will anyone protest if I add the following lines to each header listed
> in a _HEADERS primary target in the appropriate Makefile.am? That should
> get all of the installed headers, which as far as I know are the only
> ones which need this.
>
> #ifdef __cplusplus
> extern "C"
> {
> #endif /* __cplusplus */
>
> [ ... header contents here ... ]
>
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
Since ORBit2 uses glib, it's better to use G_BEGIN_DECLS/G_END_DECLS.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]