From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23683 invoked by alias); 26 May 2003 22:22:35 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 23592 invoked from network); 26 May 2003 22:22:34 -0000 Received: from unknown (HELO mwinf0201.wanadoo.fr) (193.252.22.29) by sources.redhat.com with SMTP; 26 May 2003 22:22:34 -0000 Received: from pejitei (unknown [193.253.200.217]) by mwinf0201.wanadoo.fr (SMTP Server) with SMTP id A7DCC300040E for ; Tue, 27 May 2003 00:22:33 +0200 (CEST) Message-ID: <000901c323d5$8c8af8f0$0c00000a@pejitei> Reply-To: "Ghislain Cottat" From: "Ghislain Cottat" To: Subject: Unresolved reference _imp__pthread_XXXX Date: Mon, 26 May 2003 22:22:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2003/txt/msg00056.txt.bz2 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 :