Greg Ercolano wrote: > Percy wrote: >>> 1) Comment out the '#warning' at or around line 85 >>> >>> 2) Add the following at the top to prevent an error about >>> gethostname(): >>> >>> #include <Winsock2.h> >>> >>> 3) Add the following before the closing brace on the function >>> Fl_Preferences::newUUID() #2 or #3. >> I done this and most of them compiled. But I still have 15 that failed. > > Yes, I can replicate that here too.. it's a mess alright. > > Much of this seems related to recent mods to Fl_Preferences > which need to be rectified, if not already in SVN current. > (On windows I can only pull tar files, I don't know of an > SVN client for windows.)
Tortoise svn is often recommended, but I don't use it, because I have the cygwin tools installed. http://tortoisesvn.tigris.org/ If you have subversion on any platform, then you can always use "svn extract" to make a clean copy w/o the .svn files and pack this with the packer you like. This does even work with local modifications. You can also access the online subversion repository, and for this specific problem you could simply pull the fixed[1] version from: <http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/src/Fl_Preferences.cxx> Use your browser and save the file to your local disk. > My recommended inclusion of Winsock2.h might be wrong here.. > I thought we were using wsock2 now, so either my #include is wrong, It's not wrong per se, but you need ws2_32.lib then, and we don't want to link with the Winsock dll any more. > or the linker options for many of the demos now need to link in > wsock2 libs that weren't doing that before. We removed this dependency when we switched to 1.3 and loaded the needed functions dynamically. > The fact that fluid doesn't build due to that gethostname link error > means all apps dependent on fluid will fail as well (keyboard demo, etc) That's correct. > There is probably a win32 call to get the local hostname without having > to include the entire wsock2 lib. > > Let's see what the guys currently doing dev on Fl_Preferences > will reply. They'll really have to test with VS2008 to make > sure checkins work, as many people are using VS2008 now. I'm not the developer of Fl_Preferences (that's Matt), but I fixed[1] this issue in current svn (and posted a patch previously!). --- [1] My fix is only preliminary, in that it removes the gethostname() call completely and uses the const. string "localhost" instead, since Matt intends to modify this function anyway (AFAIK). It is currently not really used and ready, so that's what I thought was the easiest fix. Greg, your fix using the COMPUTERNAME env. var. is nice ;-) A proper solution would be to load gethostname (and the winsock dll) dynamically, but I was too lazy to do that ;-P . I also fixed the missing return statement. Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

