Hello

I need pthread.h library in my program in C and i am using Visual Studio. how can i use threading in C? i visited this site.
but i dont know what to download and where to put it. I mean what am i supposed to download- header file or library. and where to put it in visual studio.i am confused. please somebody explain me.

i have visited some threads. but nothing is given about this. i am a new to this.so it wud be good if some body explain me.

Drew S.

i am just making a console based application to learn this thing. so just explain what to do if i want to use <pthread.h> in my application.

Read the FAQ in the site you linked. All the information is there.

are you sure you really need to use POSIX threads on Windows? The Windows API has plenty of support for multithreading
http://msdn.microsoft.com/en-us/library/ms684841%28VS.85%29.aspx

but if you really do need to use the Win32 port of pthreads, you can get it from here:
http://sourceware.org/pthreads-win32/

and a good tutorial here:
https://computing.llnl.gov/tutorials/pthreads/#PthreadsAPI

EDIT: hmm, the sourceware.org site seems to be down at the moment. try again later.

.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.