Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

pthread_create and pthread_detach?

hello

Can soebody tell me why pthread_create and pthread_detach arn't reconised by the compiler even though i have included pthread.h.

thanks for any help!

Comments

  • jayakhannajayakhanna Member Posts: 3
    : hello
    :
    : Can soebody tell me why pthread_create and pthread_detach arn't reconised by the compiler even though i have included pthread.h.
    :
    : thanks for any help!
    :


    Well while compiling you need to give

    gcc filename.c -lpthreads

    Just try this

    Regards
    JK

  • neilsheltonneilshelton Member Posts: 34
    Thank you for your help JK but it now comes up with 'does not recognise lpthreads!! Am i missing a library file or something??


    : Well while compiling you need to give
    :
    : gcc filename.c -lpthreads
    :
    : Just try this
    :
    : Regards
    : JK
    :
    :

  • jayakhannajayakhanna Member Posts: 3
    I am really sorry, it is -lpthread and not -lpthreads, just a typo

    Regards
    JK

    : Thank you for your help JK but it now comes up with 'does not recognise lpthreads!! Am i missing a library file or something??
    :
    :
    : : Well while compiling you need to give
    : :
    : : gcc filename.c -lpthreads
    : :
    : : Just try this
    : :
    : : Regards
    : : JK
    : :
    : :
    :
    :

  • neilsheltonneilshelton Member Posts: 34
    Problem solved, thanks for your help again JK!


    : I am really sorry, it is -lpthread and not -lpthreads, just a typo
    :
    : Regards
    : JK
    :
    : : Thank you for your help JK but it now comes up with 'does not recognise lpthreads!! Am i missing a library file or something??

  • spnayakspnayak Member Posts: 1
    Thank you Mr. JK
    ThoughI have not asked this question but I was also
    facing the same problem for last some days, now it is working
    once again thanks
    regards
    spnayak


    : I am really sorry, it is -lpthread and not -lpthreads, just a typo
    :
    : Regards
    : JK
    :
    : : Thank you for your help JK but it now comes up with 'does not recognise lpthreads!! Am i missing a library file or something??
    : :
    : :
    : : : Well while compiling you need to give
    : : :
    : : : gcc filename.c -lpthreads
    : : :
    : : : Just try this
    : : :
    : : : Regards
    : : : JK
    : : :
    : : :
    : :
    : :
    :
    :

Sign In or Register to comment.