Linux编程日常错误
- 编译的时候出现如下错误提示:
undefined reference to `sem_init'
undefined reference to `sem_post'
undefined reference to `sem_wait'
编译选项需要加入一个多线程:
gcc -pthread -o outfile.out filename.c
undefined reference to `sem_init'
undefined reference to `sem_post'
undefined reference to `sem_wait'
编译选项需要加入一个多线程:
gcc -pthread -o outfile.out filename.c