pThreads 2.8.0 build with VS 2005 (VC 8)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pThreads 2.8.0 build with VS 2005 (VC 8)

Milan Gornik

I have Microsoft Visual Studio 2005 / Visual C++ 8. I tried to build
pThreads library v2.8.0 from the source code and had some problems.

Following configurations don't build successfully:

1) nmake clean vce

   Creating library pthreadVCE2.lib and object pthreadVCE2.exp
misc.obj : error LNK2019: unresolved external symbol _ptw32_mcs_lock_release
referenced in function "void __cdecl ptw32_once_on_init_cancel(void *)"
(?ptw32_once_on_init_cancel@@YAXPAX@Z)
misc.obj : error LNK2019: unresolved external symbol _ptw32_mcs_lock_acquire
referenced in function _pthread_once
mutex.obj : error LNK2019: unresolved external symbol _ptw32_relmillisecs
referenced in function "int __cdecl ptw32_timed_eventwait(void *,struct
timespec const *)" (?ptw32_timed_eventwait@@YAHPAXPBUtimespec@@@Z)
semaphore.obj : error LNK2001: unresolved external symbol
_ptw32_relmillisecs
pthreadVCE2.dll : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.

2) nmake clean vce-debug

   Creating library pthreadVCE2d.lib and object pthreadVCE2d.exp
misc.obj : error LNK2019: unresolved external symbol _ptw32_mcs_lock_release
referenced in function _pthread_once
misc.obj : error LNK2019: unresolved external symbol _ptw32_mcs_lock_acquire
referenced in function _pthread_once
mutex.obj : error LNK2019: unresolved external symbol _ptw32_relmillisecs
referenced in function "int __cdecl ptw32_timed_eventwait(void *,struct
timespec const
 *)" (?ptw32_timed_eventwait@@YAHPAXPBUtimespec@@@Z)
semaphore.obj : error LNK2001: unresolved external symbol
_ptw32_relmillisecs
pthreadVCE2d.dll : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.

Other configurations are building successfully, with some warnings though.

Is this a known issue? Are there known workarounds? Or, am I just missing to
set enivornment properly before build?

Regards,
Milan Gornik