c++ - LNK1104 : Cannot open file pthreadsVC2.lib -


this error when tying build simple code threads.

1>------ rebuild started: project: sample_with_threads, configuration: debug win32 ------ 1>  source.cpp 1>c:\users\documents\visual studio 2010\projects\sample_with_threads\source.cpp(39): warning c4715: 'set_cur_avg' : not control paths return value 1>link : fatal error lnk1104: cannot open file 'pthreadsvc2.lib' ========== rebuild all: 0 succeeded, 1 failed, 0 skipped ========== 

i use visual c++ , followed http://web.cs.du.edu/~sturtevant/pthread.html include pthreads in it.

why error occurring , solution?

did follow instructions in link posted? says:

  • from lib folder download.

  • paste pthreadvc2.lib (object file library) visual studio 2010 lib folder c++.

    • on computer located @ c:\program files (x86)\microsoft visual studio 10.0\vc\lib. similar or same on other systems.

a bit further down, says:

  • go common properties>linker>input.

  • in additional dependencies add pthreadvc2.lib dependency.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -