Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Section - 2.30: How do I use POSIX threads with gcc 2.7.x?

( Part1 - Part2 - Part3 - Part4 - Part5 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Zip codes ]


Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.29: How do I access more than 256 Megabytes of memory?
Next Document: 2.31: Why does pthread_create return the error code 22?
See reader questions & answers on this topic! - Help others by sharing your knowledge

The code generated by GCC is compatible with threads, but gcc-2.7 
was released so long ago that it did not provide an option to perform
the extra link steps necessary to support threads:

1) Compile all source files with "-D_THREAD_SAFE" macro defined.
2) Link with "-L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a"
   to obtain the pthreads support 
   and add "-nostartfiles /usr/lib/crt0_r.o" to the beginning of the
   link command line (using gcc to link!) to initialize threads.

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: comp.unix.aix Frequently Asked Questions (Part 4 of 5)
Previous Document: 2.29: How do I access more than 256 Megabytes of memory?
Next Document: 2.31: Why does pthread_create return the error code 22?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
bofh@mail.teleweb.pt (Jose Pina Coelho)





Last Update March 27 2014 @ 02:11 PM