This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: fltk check or enum quest
- From: David Stacey <drstacey at tiscali dot co dot uk>
- To: cygwin at cygwin dot com
- Date: Wed, 12 Mar 2014 20:52:29 +0000
- Subject: Re: fltk check or enum quest
- Authentication-results: sourceware.org; auth=none
- References: <5320A22C dot 20006 at gmail dot com>
On 12/03/2014 18:06, Marco Atzeri wrote:
I am hitting a gcc/fltk craziness, and I have no clue what to look for.
The attached example is extracted from octave configure log,
and I am almost sure that nor the test nor the fltk header
are changed at all recently.
The problem is that the enumerations in FL/Enumerations.H are using the
C++ style syntax, and the conftest source code has the '.c' extension,
so gcc treats it as C.
The C++ syntax for an enumeration is as follows:
enum EColours { eRed, eGreen, eBlue };
The C syntax for an enumeration is as follows:
typedef enum { eRed, eGreen, eBlue } EColours;
You have two options. Either patch FL/Enumerations.H to use the C syntax
(there are also a number of C++ style comments that you may have to
change). Or, change the test to write out a file with a '.cpp'
extension, invoke g++ and drop the -Wimplicit-function-declaration (as
this is not valid for C++).
Hope this helps,
Dave.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple