[問題] 想請問Unix Network Programming一書的 …
小弟我最近開始讀Advance Programming in the UNIX Environment一書
想要嚐試code 書中的程式碼
也就照著書上提供的網頁 去下載了apue.h
並且解壓縮編譯後放在/usr/include這個資料夾中
可是在我編譯程式的的時候
會出現以下的錯誤
/tmp/cckYAUFP.o: In function `thr_fn':
test_unix_programming.c:(.text+0xed): undefined reference to
`pthread_sigmask'
test_unix_programming.c:(.text+0x104): undefined reference to `err_sys'
/tmp/cckYAUFP.o: In function `main':
test_unix_programming.c:(.text+0x295): undefined reference to `err_quit'
test_unix_programming.c:(.text+0x2d3): undefined reference to `err_quit'
test_unix_programming.c:(.text+0x327): undefined reference to `err_sys'
test_unix_programming.c:(.text+0x35f): undefined reference to
`pthread_create'
test_unix_programming.c:(.text+0x37b): undefined reference to `err_exit'
test_unix_programming.c:(.text+0x3b3): undefined reference to
`pthread_sigmask'
test_unix_programming.c:(.text+0x3c3): undefined reference to `err_sys'
collect2: ld 回傳 1
可是我去看 apue.h 裡面 ,都有這些函式
不知道是那裡出現了問題
希望各位大大指點一下 告訴我該怎麼樣才能使用apue.h @@
感謝大家<(_ _)>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.243.43
※ 編輯: king19880326 來自: 140.112.243.43 (04/02 00:42)
※ 編輯: king19880326 來自: 140.112.243.43 (04/02 00:47)
推
04/02 02:33, , 1F
04/02 02:33, 1F
→
04/02 02:35, , 2F
04/02 02:35, 2F
→
04/02 02:36, , 3F
04/02 02:36, 3F
推
04/02 15:13, , 4F
04/02 15:13, 4F
→
04/02 15:14, , 5F
04/02 15:14, 5F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章