Unresolved external symbol __imp_pthread_mutex_unlock
Josh Henrie
jhenrie2@gmail.com
Thu Nov 8 21:54:00 GMT 2018
I have compiled pthreads-win32 as a static library using VS 2008 with the
following preprocessor definitions:
_DEBUG
_WIN32_WCE=0x600
UNDER_CE
WINCE
DEBUG
_LIB
ARM
_ARM_
_UNICODE
UNICODE
HAVE_CONFIG_H
NEED_PROCESS_AFFINITY_MASK
NEED_ERRNO
__PTW32_RC_MSC
__PTW32_ARCHARM
__PTW32_STATIC_LIB
However, when I try to link it with my project I get the following linker
errors:
error LNK2001: unresolved external symbol __imp_pthread_mutex_unlock
error LNK2001: unresolved external symbol __imp_pthread_mutex_lock
error LNK2001: unresolved external symbol __imp_pthread_self
error LNK2001: unresolved external symbol __imp_pthread_cond_signal
error LNK2001: unresolved external symbol __imp_pthread_join
error LNK2001: unresolved external symbol __imp_pthread_create
error LNK2001: unresolved external symbol __imp_pthread_equal
error LNK2019: unresolved external symbol __imp_pthread_cond_timedwait
error LNK2019: unresolved external symbol __imp_pthread_cond_broadcast
When I use `dumpbin /symbols` on the static library I see the following
symbols:
4BE 00005CC0 SECT8 notype () External | pthread_mutex_unlock
44D 000050B4 SECT8 notype () External | pthread_mutex_lock
399 00004428 SECT8 notype () External | pthread_self
2E6 0000359C SECT8 notype () External | pthread_cond_signal
83D 0000A110 SECT8 notype () External | pthread_join
332 00003D50 SECT8 notype () External | pthread_create
377 0000423C SECT8 notype () External | pthread_equal
32B 00003D00 SECT8 notype () External | pthread_cond_timedwait
302 000038C0 SECT8 notype () External | pthread_cond_broadcast
Why is the linker trying to resolve the functions with the prefix `__imp_`?
What do I need to do to resolve the symbols?
More information about the Pthreads-win32
mailing list