From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12013 invoked by alias); 8 Jan 2004 13:50:29 -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 12003 invoked from network); 8 Jan 2004 13:50:28 -0000 Received: from unknown (HELO motgate8.mot.com) (129.188.136.8) by sources.redhat.com with SMTP; 8 Jan 2004 13:50:28 -0000 Received: from il06exr04.mot.com (il06exr04.mot.com [129.188.137.134]) by motgate8.mot.com (Motorola/Motgate3) with ESMTP id i08DoSDc006835 for ; Thu, 8 Jan 2004 06:50:28 -0700 (MST) Received: from zmy01exm02.corp.mot.com ([10.228.200.132]) by il06exr04.mot.com (Motorola/il06exr04) with ESMTP id i08DoPGN001660 for ; Thu, 8 Jan 2004 07:50:26 -0600 Received: by zmy01exm02.corp.mot.com with Internet Mail Service (5.5.2657.2) id ; Thu, 8 Jan 2004 21:50:24 +0800 Message-ID: <47C7742111D3D511A01000D0B7B0C7C20F658E39@zmy01exm02.corp.mot.com> From: Kok YihTzye-CYK011 To: "'Srdjan'" , pthreads-win32@sources.redhat.com Subject: RE: Problem linking in pthread librarry.... (Newbie) Date: Thu, 08 Jan 2004 13:50:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2004/txt/msg00003.txt.bz2 I am facing the same problem as well. I am very interested to know the answer. -----Original Message----- From: pthreads-win32-owner@sources.redhat.com [mailto:pthreads-win32-owner@sources.redhat.com] On Behalf Of Srdjan Sent: Thursday, January 08, 2004 8:31 PM To: pthreads-win32@sources.redhat.com Subject: Problem linking in pthread librarry.... (Newbie) Hi, After reading all the readme's and FAQs I still have a bit of a problem linking with pthread for win32. Somebody might have already solved it... Here is the problem.... I am porting a small daemon program from linux to win32 (... yes, I know...). Anyway, becasue this little beast is supposed to be used on systems that I am unable to install the pthread.dll, I am trying to build a static pthread library and link it in with my code. I have fudged building process using VC7.1 (.NET) so it does build a .lib file, however, when I try linking with my code, I get the following link problems: ============================================================================ ============= fdca.obj : error LNK2019: unresolved external symbol __imp__pthread_join referenced in function _main fdca.obj : error LNK2019: unresolved external symbol __imp__pthread_create referenced in function _main fdca_schedule.obj : error LNK2001: unresolved external symbol __imp__pthread_create fdca_collect.obj : error LNK2019: unresolved external symbol __imp__pthread_exit referenced in function _fdca_collect fdca_command.obj : error LNK2019: unresolved external symbol __imp__pthread_exit referenced in function _fdca_command fdca_schedule.obj : error LNK2001: unresolved external symbol __imp__pthread_exit ds.lib(ds.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_init referenced in function _ds_list_init ds.lib(ds.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_unlock referenced in function _ds_list_insert ds.lib(ds.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_lock referenced in function _ds_list_insert .\/winagent.exe : fatal error LNK1120: 7 unresolved externals ============================================================================ ============= Now, I am sure I have stuffed up something, but I can't figure out what (obvious conclusion :-). My code seems to generate '__imp__function_name' instead of '_function_name'. I have a number of other external static libraries I am linking with, but they all seem to be linking in happily. The Makefile with nmake builds only a DLL version, and I am trying at the moment to get it to build a static lib too, but with not much success. I would be ethernally grateful if somebody was able to quickly identify what I am doing wrong. Cheers, Srdjan Melbourne