문제

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

도움이 되었습니까?

해결책

Just add the option -pthread or -lpthread when linking.

Options -std=c99/c11 will restrict the available library functions to those of C99/C11 standard library

For getting C99/C11 languages features/library and and POSIX (and some BSD and some GNU extension) APIs, one can use -std=gnu99 or -std=gnu11 option to GCC.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top