This is my first study note, and I decide finish it in Englidh, I wil continue keep to write in English. It's doesn't mean how good of my English. I just think I should give myself a way to use what I learn. Otherwise, why I have to learn so hard.
When I code the exp 11-1 in the <APUE> I found in the Ubuntu, the function pthread_create() can't pass the gcc compile. It's note:
undefine reference "pthread_create()"
finally, I found the Linux don't include the Lib of pthread. You shunld add this while it's compile:
gcc chen.c -lpthread lib/libapue.a.
在学习《APUE》时遇到在Ubuntu环境下使用pthread_create()函数无法通过gcc编译的问题,发现Linux系统未包含pthread库。通过在编译时添加-lpthread参数解决了此问题。
1536

被折叠的 条评论
为什么被折叠?



