Re: using thread with gcc on fedora [undefined reference to pthread_create]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Abid Ghufran wrote:

> I am using thread in my application.
> 
> When i try to compile the code, the gcc says that the "pthread_create" is
> an undefined reference. I have included the library pthread.h. Is there
> something else that i need to do.
> 
>  What options do I have to use when compiling my code?

I believe you need to use:
gcc -pthread

-- Rex


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux