DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2781
Version: 1.3.0


Meanwhile I installed Ubuntu 11.10, and I can reproduce the error message,
but only if I add a *bad* preprocessor macro, as can be seen in the
attached test file str_2781.cxx (see "uncomment...").

Thus, it looks as if an incompatible header file or something in your own
code is introducing the error, but not FLTK's header files or code.

This is from my dirent.h header file:
$ cat -n /usr/include/dirent.h | grep -4 "^   100"
    96  #ifdef __USE_BSD
    97  /* File types for `d_type'.  */
    98  enum
    99    {
   100      DT_UNKNOWN = 0,
   101  # define DT_UNKNOWN     DT_UNKNOWN
   102      DT_FIFO = 1,
   103  # define DT_FIFO        DT_FIFO
   104      DT_CHR = 2,

See line #100 for the referenced error line.

One possibility to get the shown error message is to define DT_UNKNOWN as
a numeric constant, probably 0. Does anything in your code do this?

In fact, if I uncomment "#define DT_UNKNOWN 0" in the attached test file,
I get this:

$ /path/to/fltk-1.3/fltk-config --compile str_2781.cxx
# <g++ command line removed>
In file included from /path/to/fltk-1.3/FL/filename.H:98:0,
                 from /path/to/fltk-1.3/FL/Fl_File_Browser.H:31,
                 from /path/to/fltk-1.3/FL/Fl_File_Chooser.H:34,
                 from str_2781.cxx:10:
/usr/include/dirent.h:100:5: error: expected identifier before numeric
constant
/usr/include/dirent.h:100:5: error: expected ‘}’ before numeric
constant
/usr/include/dirent.h:100:5: error: expected unqualified-id before numeric
constant
In file included from /path/to/fltk-1.3/FL/filename.H:98:0,
                 from /path/to/fltk-1.3/FL/Fl_File_Browser.H:31,
                 from /path/to/fltk-1.3/FL/Fl_File_Chooser.H:34,
                 from str_2781.cxx:10:
/usr/include/dirent.h:362:1: error: expected declaration before ‘}’
token
--- snip ---

... which is the same as your error messages (with slightly different line
numbers, due to a newer FLTK version).

Please check your code and report, if this is not the problem, and if it
isn't please post a minimal code example (like mine) that shows the error.
Otherwise this STR will be closed in a few days.

Please report also, if this information solves your problems, so that we
can close the STR.


Link: http://www.fltk.org/str.php?L2781
Version: 1.3.0
//
// Test for STR #2781
//
// uncomment the following statement to get the reported error messages:
// #define DT_UNKNOWN 0

#include <FL/Fl_File_Chooser.H>

int main(int argc, char ** argv) {
  return 0;
}
_______________________________________________
fltk-bugs mailing list
fltk-bugs@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to