Re: Re: Linking problem with extension written in C++
| From: | Jay Smith | Date: | Mon, 14 Apr 2003 16:26:33 +0000 |
| Subject: | Re: Re: Linking problem with extension written in C++ | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-905@lists.php.net to get a copy of this message | ||
It kind of seems messy to wrap everything in extern "C". It would probably
be better to weed out the individual API functions that need to be extern
C'd. I'll try and seek out the offending functions. There aren't too many
of them AFAIK...
J
Per Lundberg wrote:
> On Mon, 2003-04-14 at 16:19, Jay Smith wrote:
>> There are a few header files that you have to include with extern "C" so
>> their names get mangled properly into C++. Try wrapping php.h, php_ini.h
>> and info.h in extern "C" and see how that goes.
>
> How come we don't have extern C wrapped in #ifdef __cplusplus in these
> files already, so they can just be included straight away? Like this:
>
> #ifdef __cplusplus
> extern "C" {
> #endif
>
> // yadda yadda
>
> #ifdef __cplusplus
> };
> #endif
>
> --
> Best regards,
>
> Per Lundberg / Capio ApS
> Phone: +46-18-4186040
> Fax: +46-18-4186049
> Web: http://www.nobolt.com