本文介绍了无法编译调用tgkill的程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个使用tgkill将信号发送到特定线程的程序,但是每当我用gcc对其进行编译时,都会收到有关未定义引用'tgkill'的错误.我尝试使用-lpthread进行编译,但没有帮助.我已经在Google和Google上搜索了,无法给出任何答案.如何获取它进行编译?

I'm trying to write a program that uses tgkill to send a signal to a specific thread, but whenever I compile it with gcc I get an error about an undefined reference to 'tgkill'. I tried compiling with -lpthread but it didn't help. I've googled and googled and can't come up with any answers. How do I get it to compile??

推荐答案

来自tgkill()联机帮助页:

这篇关于无法编译调用tgkill的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 02:43