From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14649 invoked by alias); 12 May 2006 09:33:55 -0000 Received: (qmail 14636 invoked by uid 22791); 12 May 2006 09:33:54 -0000 X-Spam-Check-By: sourceware.org Received: from py-out-1112.google.com (HELO py-out-1112.google.com) (64.233.166.178) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 12 May 2006 09:33:50 +0000 Received: by py-out-1112.google.com with SMTP id m51so498261pye for ; Fri, 12 May 2006 02:33:48 -0700 (PDT) Received: by 10.35.111.7 with SMTP id o7mr1758921pym; Fri, 12 May 2006 02:33:48 -0700 (PDT) Received: from ?192.168.0.6? ( [59.144.189.13]) by mx.gmail.com with ESMTP id i72sm171789pye.2006.05.12.02.33.42; Fri, 12 May 2006 02:33:47 -0700 (PDT) Message-ID: <44645666.4060300@gmail.com> Date: Fri, 12 May 2006 09:33:00 -0000 From: Divick Kishore User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 To: Mats Aubell CC: pthreads-win32@sourceware.org Subject: Re: Linking problem References: <446443c0.09c99bc9.0bf2.310bSMTPIN_ADDED@mx.gmail.com> In-Reply-To: <446443c0.09c99bc9.0bf2.310bSMTPIN_ADDED@mx.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2006/txt/msg00016.txt.bz2 >>The 3 headers files are in the same folder and the lib file has been added through the tools->options->projects->vc++ directories. That is not the place where you add the linker option, instead add the pthreadVC.lib in the project properties -> linker -> input -> additional dependencies tab. And that should work. Which pthread*.lib to link, is specified in the README file of pthread installation. hope that helps, Divick Mats Aubell wrote: > Hi all, > > I'm having problems getting the pthread library to work. I've followed the > instructions which can be found in the faq > (http://sourceware.org/pthreads-win32/faq.html). I have the dll file in the > Windows catalog. The 3 headers files are in the same folder and the lib file > has been added through the tools->options->projects->vc++ directories. When > I compile I get this error msg: > > ssds error LNK2019: unresolved external symbol __imp__pthread_create > referenced in function _main > > The relevant source code can be seen under. > > #include "pthread.h" > > > void * threadBehavior(void * arg) > { > printf("TEST\n"); > return 0; > } > > > pthread_t m_threadBehavior; > > int main(int argc, char *argv[]) > { > if (pthread_create(&m_threadBehavior, NULL, threadBehavior, NULL)) > { > printf("Cannot create the behavior thread.\n"); > return false; > } > return 0; > > I'm running WinXP and Microsoft Visual Studio 2003. Getting quite desperate > for help, so any feedback is greatly appreciated. > > Regards, > Mats Aubell > > > >