<分区>
我无法将 pthread 链接到我的程序。我尝试了 gcc Tracker.c -lpthread -lwiringPi
并且只得到了 undefined reference to pthread_creat
。我尝试使用 -lpthread
和 -pthread
。我在互联网上也找不到解决方案。
<分区>
我无法将 pthread 链接到我的程序。我尝试了 gcc Tracker.c -lpthread -lwiringPi
并且只得到了 undefined reference to pthread_creat
。我尝试使用 -lpthread
和 -pthread
。我在互联网上也找不到解决方案。
最佳答案
undefined reference to pthread_creat
创建 POSIX 线程的函数称为 pthread_create()
.
关于无法使用多线程在我的树莓派上编译我的 C 程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42175955/