> 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.


> 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.



SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to