MacArthur, Ian (SELEX GALILEO, UK) wrote: > >> I am getting the following compile error: >> >> In file included from bookmarks_functions.h:16, >> from bookmarks_functions.cpp:12: >> /usr/include/FL/Fl_Preferences.H:174: error: 'FILE' has not >> been declared >> >> >> This program used to compile without any problems. I am using >> FLTK 1.3.x SVN >> 6728 >> >> The workaround that I am using now is: >> >> #define FILE void >> #include <FL/Fl_Preferences.H> >> #undef FILE >> >> I'm not sure what has changed. Could it be that >> Fl_Preferences.H is missing >> a header file? I tried including <stdio.h> and <unistd.h> >> before I include >> FL/Fl_Preferences.H, but that didn't fix the problem - I >> received the same >> error. >> >> The only thing that has worked in defining a dummy FILE macro >> and then >> undefining it (as above). >> >> Anyone else having this problem? > > Looking at the 1.1.10 / 1.3.x versions, the only non-doc change seems to > be that the following lines are removed from the file... > > # ifdef WIN32 > # include <windows.h> > # endif // WIN32 > > # include <stdio.h> > # include "Fl_Export.H" > > > I guess that could be relevant, but I wonder, then, why #including > stdio.h did not just fix it?
I must have done something wrong when I tried including it. I just tried again: #include <stdio.h> #include <FL/Fl_Preferences.H> And this works. I also like it better than the nasty #define I had before. Should I file a STR for this? Alvin _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

