[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#224757: X11/extensions/Xinerama.h missing extern "C"



On Sun, Dec 21, 2003 at 03:01:01PM -0800, Matt Zimmerman wrote:
> I'm not certain where it's supposed to come from, but there should be an
> extern "C" in there somewhere if <magic C++ compiler macro> is defined.
> Currently, this header is unusable in C++ programs.
> 
> mizar:[/tmp] cat test.cc
> #include <X11/extensions/Xinerama.h>
> 
> int main() {
>         XineramaQueryExtension(NULL,NULL,NULL);
>         return 0;
> }
> mizar:[/tmp] gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
> -lXext
> /tmp/cci2yPT9.o(.text+0x28): In function `main':
> : undefined reference to `XineramaQueryExtension(_XDisplay*, int*, int*)'
> /tmp/cci2yPT9.o(.eh_frame+0x11): undefined reference to
> `__gxx_personality_v0'
> collect2: ld returned 1 exit status
> zsh: exit 1     gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
> -lXext
> mizar:[/tmp] gcc -x c -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
> -lXext
> mizar:[/tmp]

You're right. This is an idea I vetoed, only to be smacked down because
I was wrong.

#ifdef __cplusplus
extern "C" {
#endif

[...]

#ifdef __cplusplus
}
#endif

:) d

-- 
Daniel Stone                                                <daniels@debian.org>
Debian X Strike Force:                    http://people.debian.org/~branden/xsf/

Attachment: pgp1lWx4UrcKp.pgp
Description: PGP signature


Reply to: