Greg Ercolano wrote: > Greg Ercolano wrote: >> Albrecht Schlosser wrote: >>> Now I'm totally confused. The error message you posted referred to >>> line #1477, which is the second occurrence of FORCE_POSITION. The >>> first is in line #1295. What is the error message? >> I did a 'Rebuild solution', but who knows what goes on in the GUI. >> >> I'll do a complete remove and re-extract, then let you know what >> mods work. > > Yep, you're right.
Phew... :-P > I forgot when you do a 'Rebuild solution' in the GUI it doesn't stop > when it hits an error (like it does with make), it just keeps going > right on through. Yep, I thought of something like this (Windows GUI confusion ;-) ). > I did a remove/reinstall/rebuild, and indeed when I changed the > "Fl_Widget::FORCE_POSITION" -> "Fl_Window::FORCE_POSITION" it > worked. (Had to put back the #ifndef POLL stuff) Okay, then my proposal is to use this (part of the) solution WRT FORCE_POSITION. But see below... > THE Fl_win32.cxx FROM SVN r6971 WITH MODS: > http://seriss.com/people/erco/fltk/tmp/Fl_win32.cxx-svn-6971-with-mods We can't use that simple #ifndef POLLIN that you used. Looking at the code, you can see that POLLIN, POLLOUT, and POLLERR *must* match FL_READ, FL_WRITE, and FL_EXCEPT, resp., as declared in FL/Enumerations.H: $ grep -3 FL_WRITE FL/Enumerations.H enum { // values for "when" passed to Fl::add_fd() FL_READ = 1, FL_WRITE = 4, FL_EXCEPT = 8 }; $ grep 'POLL\|add_fd' src/Fl_win32.cxx # define POLLIN 1 # define POLLOUT 4 # define POLLERR 8 void Fl::add_fd(int n, int events, void (*cb)(int, void*), void *v) { if (events & POLLIN) FD_SET((unsigned)n, &fdsets[0]); if (events & POLLOUT) FD_SET((unsigned)n, &fdsets[1]); if (events & POLLERR) FD_SET((unsigned)n, &fdsets[2]); [... more hits elided...] The events argument is tested for POLLIN etc., but is defined to use the FL_READ etc. constants in the interface documentation. <http://www.fltk.org/doc-1.3/classFl.html#76b6c3f9043d22034a47177914fd4054> Now, looking at this again, I remember that I once wondered why the code doesn't use the FL_* constants instead of declaring its own, but maybe this is for some "code compatibility" with other platforms, where the POLL* constants are defined. Conclusion: IMO the _correct_ solution is to replace POLL* with FL_* (see above) and *not* to define them in Fl_win32.cxx at all. The second best solution would be to undefine and redefine them, but I think that this would only lead to confusion. We'll also have to check this (matching POLL* an FL_*) for other platforms as well... Albrecht _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
