[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

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

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?


2.30: How do I use POSIX threads with gcc 2.7.x?



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.



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 October 22 2009 @ 05:22 AM

Some parts © 2009 Advameg, Inc.