2013年8月31日星期六

libpthread.a linux multithreading library

Recent threads in apue learning has been prompted to pthread_create is undefined references , online search a bit , to at compile time to join -lpthread. But this is still undefined after tried . I use the latest version of ubuntu, to / usr / lib looked down , unable to find libpthread.a this library . Could also do not own ? ? ? If not , then I can not find where to go online to download.
help ah , , online, etc. ~ ~ ~ ~ ~ ~ ~ ~ ~
------ Solution ------------------- -------------------------
in / usr / lib / down to be a link to try
------ For reference only --------------------------------------- < br> search for the next, my machine is having this dynamic library .

/ usr/lib/i386-linux-gnu/xen/libpthread.a
/ usr/lib/i386-linux-gnu/libpthread.a

------ For reference only ---------------------------------- -----

been resolved, thank you , online answer is gcc-lpthread < filename >
gcc on my machine to use gcc < filename >-lpthread

没有评论:

发表评论