gcc and threads
Hello everybody,
does anyone know, how to enable the thread-support for gcc ?
Thank you...
Gruss Christian Stalp
Signature · 13 lines
Christian Stalp Institut für Medizinische Biometrie, Epidemiologie und Informatik (IMBEI) Obere Zahlbacher Straße 69 55131 Mainz Tel.: 06131/ 17-6852 E-Mail: [email protected] Internet: www.imbei.de - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 2004-11-25 17:25:54 +0100, Christian Stalp <[email protected]> wrote in message <[email protected]>:
Quoted 2 lines
Hello everybody,
does anyone know, how to enable the thread-support for gcc ?
There are several parts that need proper configury to actually reach a multi-threaded application:
- a thread library (typically linuxthreads or NPTL) is needed
- GCC needs to make use out of that
- your application must use it (pthread_create() et al.) and of course link agains it (-lpthread)
If you're a typical Linux user on a mainstream platform (ie. you can install your distribution's libc and gcc), then you can just start hacking a thread-using application.
If you're working on the embedded border, you've probably to first build a cross compiler. This is a major task, you may want to look at "crosstool", a number of scripts to aid the user in this task, written by Dan Kegel.
However, your question isn't specific in any way, so you may want to ask another question not that broad :-)
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));