This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fltk check or enum quest




On 12/03/2014 21:52, David Stacey wrote:
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.

thanks very much.
At least I have a starting point

As FLTK is a C++ GUI toolkit, I start to suspect that the test was always wrongly designed, and only recently automake/autoconf/gcc
started to reject it.


Marco






--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]