7
我已經失敗,出現-std = C99GCC編譯失敗,並行線程和選項性病= C99
編譯一個範例程序的任何幫助讚賞
#include <pthread.h>
int main(void) {
pthread_rwlock_t myLock;
return 0;
}
output of the two compiles:
gcc pthread_test.c
[[email protected] src]$ gcc pthread_test.c
[[email protected] src]$
gcc -std=c99 pthread_test.c[[email protected] 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’
[[email protected] src]$
'-std = gnu99'怎麼樣? – 2013-03-28 03:02:32