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: René Berber
Subject: Re: [Mingw-cross-env-list] MinGW glib threading issues?
Date: Sat, 19 Nov 2011 11:53:33 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0

On 19 Nov 2011 00:43:06, Matthias Gehre wrote:

> I'm currently trying to port lightspark
> (http://lightspark.github.com/) to win32 with the help of current
> mingw-cross-env from hg.
> I found different informations on the net regarding bugs with
> exception handling and threading, but I don't know if that is
> outdated yet. Are there issue I have to watch for?

Not really.

> With the crosscompiled binary of lightspark, I see (both on wine and
> native win32) spontanous hangs and the inability to use gdb on them.
> (mingw-cross-env's gdb does not work under my vanilla 1.3 wine (just
> hangs on any command such as 'run' or 'quit'; under native win32
> I cannot use ctrl-c to break on the console; under native win32
> eclipse, gdb can be used until that spontanous hang occurs, afterwards
> it does not regain control ).

Windows doesn't have signals, that's the reason Ctrl-C, or any other way
to send a signal, doesn't work.

You'll have to learn how to use gdb.  I prefer to use it under Cygwin,
which has a limited support for signals.  There is also a small program,
called debugbreak.c, that serves the same purpose as Ctrl-C (you just
execute it in another terminal or command window.

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

I don't know the specifics but almost all the packages built for Windows
uses native (Windows) threads.  The alternative is pthreads which is
also ported to MinGW.

> I also read that mingw's gcc needs '-mthreads' on every sourcefile if
> one uses threads. What exactly does that do? Is it enough to
> compile my own application with '-mthreads'? Are the mingw-cross-env
> packages compiled with '-mthreads'?

Read the manual, maybe, and yes:

http://gcc.gnu.org/onlinedocs/gcc-4.6.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options
-- 
René Berber




reply via email to

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