Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: From: "CLYNES Darius (SCIC)" To: cygwin AT sourceware DOT cygnus DOT com Subject: g++ error: ANSI C++ forbids declaration with not type Date: Tue, 1 Aug 2000 18:29:22 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" 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