From: "Ghislain Cottat" <ghislain.cottat@wanadoo.fr>
To: <pthreads-win32@sources.redhat.com>
Subject: Unresolved reference _imp__pthread_XXXX
Date: Mon, 26 May 2003 22:22:00 -0000 [thread overview]
Message-ID: <000901c323d5$8c8af8f0$0c00000a@pejitei> (raw)
Hello,
Trying to compile a linux project with mingw32 (latests binaries, gcc 3.2.3
and msys 1.0.8, etc.), I could build pthreadGC.dll, as well as all tests,
and run them sucessfully, but when I try to link with my project (the build
process works perfectly with linux), I have undefined reference with pthread
symbols :
g++ -o cnedra.exe -lstdc++ -lpthreadGC kernel/cnedra-kernel.o
kernel/cnedra-library.o kernel/cnedra-main.o kernel/cnedra-thread.o
kernel/cnedra-plugin.o
=>
kernel/cnedra-kernel.o: In function
`ZNSt8_Rb_treeISsSt4pairIKSsP8I_ThreadESt10_Select1stIS4_ESt4lessISsESaIS4_E
ED1Ev':
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN8CK_MutexC1Ev+0xf):
undefined reference to `_imp__pthread_mutex_init'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN8CK_MutexD1Ev+0xd):
undefined reference to `_imp__pthread_mutex_destroy'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN8CK_Mutex4LockEv+0xd):
undefined reference to `_imp__pthread_mutex_lock'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN8CK_Mutex6UnlockEv+0xd):
undefined reference to `_imp__pthread_mutex_unlock'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN20CK_ConditionVariableC1Ev
+0xf): undefined reference to `_imp__pthread_cond_init'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN20CK_ConditionVariableD1Ev
+0xd): undefined reference to `_imp__pthread_cond_destroy'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN20CK_ConditionVariable6Sig
nalEv+0xd): undefined reference to `_imp__pthread_cond_signal'
c:/mingw/include/c++/3.2/bits/stl_tree.h(.text$_ZN20CK_ConditionVariable4Wai
tER8CK_Mutex+0x10): undefined reference to `_imp__pthread_cond_wait'
kernel/cnedra-thread.o: In function `ZN9CK_ThreadC2EP8I_KernelRKSs':
d:/incoming/cnedra/kernel/thread.cpp:24: undefined reference to
`_imp__pthread_create'
The only difference between the build command in mingw and the same in linux
is that I had to remove '-rdynamic -ldl' since it is not supported/needed
with mingw, and I somehow understood that it should be harmless.
I know this looks like some silly C/C++ symbols difference, but there is
'extern "C"' is is pthread.h so everything should be fine... Actually the
symbols are OK, there is just an underscore missing I guess, since a dumpbin
on libpthreadGC.a gives :
next reply other threads:[~2003-05-26 22:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 22:22 Ghislain Cottat [this message]
2003-05-26 22:29 Ghislain Cottat
[not found] <F0E13277A26BD311944600500454CCD0569121@antarctica.intern.net>
2003-05-27 6:41 ` Thomas Pfaff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000901c323d5$8c8af8f0$0c00000a@pejitei' \
--to=ghislain.cottat@wanadoo.fr \
--cc=pthreads-win32@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).