how can I use pthread_spinlock_t in gcc 4.6.3?
Which flags do I have to specify at compile time?
I’m using Ubuntu 12.04!
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just add the option
-pthreador-lpthreadwhen linking.Options
-std=c99/c11will restrict the available library functions to those of C99/C11 standard libraryFor getting C99/C11 languages features/library and and POSIX (and some BSD and some GNU extension) APIs, one can use
-std=gnu99or-std=gnu11option to GCC.