mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] MinGW glib threading issues?


From: Dmitry Groshev
Subject: Re: [Mingw-cross-env-list] MinGW glib threading issues?
Date: Sat, 19 Nov 2011 20:06:00 +0300

Hello!

On 19/11/2011, Matthias Gehre <address@hidden> wrote:
> I saw that glib is compiled with --disable-threads (in src/glib.mk).
> Does that mean I cannot use glibs thread/mutex etc primitives?
> Lightspark depends heavily on those.

Precisely.
I guess this configuration choice was made because GTK+ cannot use
threading on Windows anyway - so if Lightspark uses GTK+, and calls
its functions (and/or GDK functions) from multiple threads, porting it
will be rather nontrivial. Otherwise (if GLib threading is enough for
Lightspark) you likely will need to configure GLib with
"--with-threads=posix".

> I also read that mingw's gcc needs '-mthreads' on every sourcefile if
> one uses threads. What exactly does that do?

Google could have answered this. ;-)
"-mthreads
    Support thread-safe exception handling on Mingw32. Code that
relies on thread-safe exception handling must compile and link all
code with the -mthreads option. When compiling, -mthreads defines
-D_MT; when linking, it links in a special thread helper library
-lmingwthrd which cleans up per thread exception handling data. "


-- 
-= With best regards, Dmitry Groshev =-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]