Sasino
Sasino

Reputation: 69

Using pthread in c++ on Visual Studio 2013

I am trying to use the pthread library on windows. I downloaded a zip with a Pre-built.2 folder in it and followed the instruction.

What I have done so far:

I included pthread.h inside my program and when trying to build solution, the following error appears:

Error   1   error LNK1104: cannot open file 'pthread.lib'

Can anyone help me out? Thanks.

EDIT:

The Include Directories and Library Directories are

A:\Program Files %28x86%29\Microsoft Visual Studio 12.0\VC\include;$(IncludePath)

and

A:\Program Files %28x86%29\Microsoft Visual Studio 12.0\VC\lib;$(LibraryPath)

respectively now. But I still get the same error message.

Upvotes: 1

Views: 3248

Answers (1)

user2189331
user2189331

Reputation:

Add the folder containing the LIBs to Configuration Properties -> VC++ Directories -> Library Directories.

Upvotes: 2

Related Questions