Mail Archives: cygwin/2000/08/01/12:30:56
Hi,
I have been compiling without problems using the gcc compiler against
standard Xlib files
like X11/Xlib.h. Now I have several c++ modules which also include X11
calls and when
I compile using the g++ compiler I get the following error:
ANSI C++ forbids declaration `XSetTransientForHint' with no type
for about 100 different functions.
the function is declare in the Xlib.h without a type like this without a
type.
extern XSetTransientForHint(
#if NeedFunctionPrototypes
Display* /* display */,
Window /* w */,
Window /* prop_window */
#endif
);
(NeedFunctionPrototypes is defined).
The C compiler and gcc
defaults to int for non-declared types, but I can't seem to get g++ to
default to int.
Does anybody know a work around. On Unix, the same code compiles under cxx
without
any problem or special switches flags ect. I have tried -traditional, and
even tried putting
extern "C" {
X11/Xlib.h
}
and tried redefining extern to extern "C"
but none of these seem to work.
I don't want to have to edit the distributed X11 files, just to get by the
g++ compiler.
Thanks in advance
Darius
ANSI C++ forbids declaration
Darius Clynes
Software Engineer
European Commission
Rue De Mot 24
Brussels, 1040
Belgium
Office tel: +32 2 2962441
fax: +32 2 2966025
Cell phone: +32 476 218850
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -