* Error linking static library (x64) in VS2008
[not found] <1374179109.59111.YahooMailNeo@web162205.mail.bf1.yahoo.com>
@ 2013-07-19 0:30 ` S R
0 siblings, 0 replies; only message in thread
From: S R @ 2013-07-19 0:30 UTC (permalink / raw)
To: pthreads-win32
I am having trouble linking my application statically on a x64 platform...(there is no problem linking the application
with the dll version).. Additional details on the errors are attached below.
Any help is much appreciated.
Thanks
Sriram
Compiler: VS 2008 9.0
System: Windows XP SP2 on x64
Errors:
xxx.obj : error LNK2019: unresolved external symbol pthread_mutex_init referenced in function ....
xxx.obj : error LNK2019: unresolved external symbol pthread_mutex_destroy referenced in function ....
xxx.obj : error LNK2019: unresolved external symbol pthread_mutex_lock referenced in function ....
xxx.obj : error LNK2019: unresolved external symbol pthread_mutex_unlock referenced in function ....
Steps I followed:
1. I compiled a static version of the pthreads_win32 lib with no errors
nmake clean VC-static
2. Added PTW32_STATIC_LIB to preprocessor flags for application
Added path to static lib in Linker->General->Additional Library Directories
Added pthreadVC2.lib in Linker->Input->Additional Dependencies
3. Looked at symbols in pthreadVC2.lib searching (for example) for pthread_mutex_init
2BFA _pthread_mutex_init
2 _pthread_mutex_init
COMDAT; sym= _pthread_mutex_init
00000000 DIR32NB 00000000 F4 _pthread_mutex_init
000000A2 REL32
00000000 F4 _pthread_mutex_init
0000008C REL32 00000000 F4 _pthread_mutex_init
000000A3 REL32 00000000 F4 _pthread_mutex_init
00000068 REL32 00000000 F4 _pthread_mutex_init
000000B0 REL32
00000000 F4 _pthread_mutex_init
000000B6 REL32 00000000 F4 _pthread_mutex_init
0F4 00000000 SECT51 notype () External | _pthread_mutex_init
--- For comparison, in the dynamically built pthreadVC32.lib, the symbols are slightly different:
5578 __imp_pthread_mutex_init
5578 pthread_mutex_init
1B __imp_pthread_mutex_init
1B pthread_mutex_init
Symbol name : pthread_mutex_init
Name : pthread_mutex_init
pthread_mutex_init
--- In file xxx.obj, the references appear as follows:
61934 _pthread_mutex_init
1 _pthread_mutex_init
COMDAT; sym= _pthread_mutex_init
00000000 DIR32NB 00000000 F4 _pthread_mutex_init
000000A2 REL32 00000000 F4 _pthread_mutex_init
0000008C REL32 00000000 F4 _pthread_mutex_init
000000A3 REL32 00000000 F4 _pthread_mutex_init
00000068 REL32 00000000 F4 _pthread_mutex_init
000000B0 REL32 00000000 F4 _pthread_mutex_init
000000B6 REL32 00000000 F4 _pthread_mutex_init
0F4 00000000 SECT51 notype () External | _pthread_mutex_init
0000000C REL32 00000000 4AC pthread_mutex_init
0000000E REL32 00000000 4AC pthread_mutex_init
4AC 00000000 UNDEF notype () External | pthread_mutex_init
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-19 0:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1374179109.59111.YahooMailNeo@web162205.mail.bf1.yahoo.com>
2013-07-19 0:30 ` Error linking static library (x64) in VS2008 S R
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).