fltk check or enum quest

David Stacey drstacey@tiscali.co.uk
Wed Mar 12 21:34:00 GMT 2014


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



More information about the Cygwin mailing list