undefined reference to 'pthread_create'
問題原因:
pthread 庫不是 Linux 系統默認的庫,連接時需要使用庫libpthread.so,所以在使用pthread_create()創建線程。需要鏈接該庫。
在編譯中要加 -lpthread參數
gcc -g -o my_thread_create my_thread_create.c -lpthread
在編譯中要加 -lpthread參數
gcc -g -o my_thread_create my_thread_create.c -lpthread
本文整理自Zabbix中級認證專家李銘栓(滿分學員)在Zabbix Meetup廣州站的演講。 掌握這幾種監控方式解決80%的監控問題,剩下的20%如何實現?這裏有答案! 幾點經驗分享: 1
一、幾個基本概念 tty(Teletypewriter) 來源於“電傳打印機”,Linux系統中則是終端設備的統稱,同時也代指操作系統中支持終端設備的tty子系統。 console(控制檯)