undefined pthread_create

I am new in "linux"... I try to work with threads but I can not pass after first compilation... coz g++ and gcc say undefined pthread_create... or something like it.. I include correctly pthread.h and writed code good (I probe many examples) but g++ accept other function like pthread_attr_setscope in the same header and not "create" and "join"... what happend? I think this function are part of the system... some module.. help?
closed account (S6k9GNh0)
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

I writed my code good too but I can't call something that isn't there. What happened is that you included the header but the functions are not defined. In order to define them you need some sort of implementation. In this case your wanting the pthreads library. Look at the link I gave you for a compilation example.
Last edited on
-lpthread

on the link line
yes thank for all... 5 minutes after I post I find the key,, like say jsmith "-lpthread"
Topic archived. No new replies allowed.