Linux编程日常错误

Posted hemeiwolong

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux编程日常错误相关的知识,希望对你有一定的参考价值。

  1. 编译的时候出现如下错误提示:

undefined reference to `sem_init‘
undefined reference to `sem_post‘
undefined reference to `sem_wait‘

编译选项需要加入一个多线程:

gcc -pthread -o outfile.out filename.c

以上是关于Linux编程日常错误的主要内容,如果未能解决你的问题,请参考以下文章