On 2008-10-27, MacArthur, Ian (SELEX GALILEO, UK) <[EMAIL PROTECTED]> wrote: > > >> BUT - I use Fl::lock() and friends a lot because i have a >> "MIDI receiver thread" that runs all the time and updates >> the UI on incoming messages. Now, the doc sais, to be able >> to use those functions FLTK needs to be built with >> --enable-threads which in turn relies on pthreads. So, as >> far as i understand it, in my case, i have to use a pthread >> lib for windows. Right? If not, that would be great and i >> would prefer some #ifdefs too. ") > > No - the fltk thread mechanism uses the native threads on each platform, > so you only need pthreads on linux/osx, where they *are* the local > thread mechanism. On winXX you just use the OS native threads. > > Where do the docs say you need pthreads? That sounds like a > documentation bug - please can you file an STR for that. > > It ought to say that you need pthreads on the *nix platforms, but use > winxx threading on Windows platforms. >
well, i guess i am doing things a little "out-of-order" because i am building FLTK on windows using mingw/msys using a ./configure, make, make install. on the configure stage FLTK looks for pthread.h and a pthread lib. if it doesnt find them it sais THREAD SUPPORT: NO when done configuring. since i dont have visual basic or whatever it is called "), how would i build FLTK with mingw and windows native thread support? > >> For now i got pthreads-win32 >> http://sourceware.org/pthreads-win32/ and successfully >> built FLTK against it (i had to add a check for >> -lpthreadGC2 in configure.in). > > Sure, this works, but is a lot of extra work, which you don't need. > pthreads-win32 just wraps win32 native threads anyway. > >> Now i wonder: both, FLTK and my app use the pthread lib. If >> i wanted it to be linked statically, i would do that when i >> build my app, not FLTK, right? Will FLTK then know that the >> lib has been linked into my app? I wonder because FLTK was >> linked against the dll in the first place. > > Really, I wouldn't bother. Just use the native threads. i hope i wont soon either ") ty, jan _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

