Lars Gullik Bjønnes wrote:
>
> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes:
>
> | Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> |
> | | >>>>> "Me" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:
> | |
> | | Me> Yes. And friend extern "C" too. It says cxx: Error:
> | | Me> ../../../lyx-devel/src/mathed/math_panel.h, line 43: linkage
> | | Me> specification is not allowed friend extern "C" int
> | | Me> peek_event(FL_FORM *, void *); ----------^
>
> what happens if you infront of class BitmapMenu ...
>
> inserts a
>
> extern "C" {
> int peek_event(FL_FORM *, void *);
> }
>
> ??
I'm following the discussion with interest, because I'm a
LyX-user on Solaris compiling with SunSoft's CC.
AFAIK the problem with mixing C and C++ is the general
incompatible implicit use of the this pointer in C++ funktions.
Everywhere in X you have a problem with C++ callback funktions.
Maybe you can solve it with static member functions.
I didn't read the source in question of this discussion, but
the general rule of thumb when using C from C++ is to wrap
the function declaration part in the header of the C interface with
extern "C" {
... header text ...
}
as used to see in the xpm header or the define and use of
#define _XFUNCPROTOBEGIN extern "C" {
and
#define _XFUNCPROTOEND }
in <X11/Xfuncproto.h>
The function pointer typedefs are outside of the extern "C" part.
Stephan
---------------------------------------------------------------
<[EMAIL PROTECTED]> | beusen unternehmensgruppe senkel
fon: +49 30 549932-62 | Landsberger Allee 392
fax: +49 30 549932-29 | 12681 Berlin, Germany
---------------------------------------------------------------