我有一个无法使用 -std=c99 编译的示例程序
任何帮助表示赞赏
#include <pthread.h>
int main(void) {
pthread_rwlock_t myLock;
return 0;
}
output of the two compiles:
gcc pthread_test.c
[brad@fedora17onbradsmacpro src]$ gcc pthread_test.c
[brad@fedora17onbradsmacpro src]$
gcc -std=c99 pthread_test.c[brad@fedora17onbradsmacpro src]$ gcc -std=c99 pthread_test.c
pthread_test.c: In function ‘main’:
pthread_test.c:5:2: error: unknown type name ‘pthread_rwlock_t’
[brad@fedora17onbradsmacpro src]$