From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27972 invoked by alias); 6 Dec 2004 06:22:48 -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 27920 invoked from network); 6 Dec 2004 06:22:42 -0000 Received: from unknown (HELO quokka.dot.net.au) (202.147.68.16) by sourceware.org with SMTP; 6 Dec 2004 06:22:42 -0000 Received: from [202.147.86.101] (helo=callisto.canberra.edu.au) by quokka.dot.net.au with esmtp (Exim 3.35 #1 (Debian)) id 1CbCGe-0001hA-00 for ; Mon, 06 Dec 2004 17:22:41 +1100 Message-ID: <41B3FAAE.8060308@callisto.canberra.edu.au> Date: Mon, 06 Dec 2004 06:22:00 -0000 From: Ross Johnson Reply-To: rpj@callisto.canberra.edu.au User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 MIME-Version: 1.0 To: "pthreads-win32@sources.redhat.com" Subject: Re: Static linking under win32 References: <200412060337.iB63beF00812@callisto.canberra.edu.au> In-Reply-To: <200412060337.iB63beF00812@callisto.canberra.edu.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg00159.txt.bz2 Gili wrote: >Hi, > > I'm sure this is a commonly asked question: how do I build >pthreads-win32 under VC++ (7.1 in my case)? I am surprised you don't >ship a project file with the source-code or discuss this in the FAQ :) > > Yes, it should be in the FAQ. Pthreads-win32 relies on dynamic linking to provide a seemless interface to it's POSIX functionality - using dllMain to do some per process and per thread initialisation and cleanup. Static linking requires your application to call some non-portable routines (see README.NONPORTABLE: pthread_win32_process_attach_np etc). That's one reason why static linking is not really 'officially' encouraged. However, there's a VS Workspace file provided that will build the DLL. It was contributed by a user and I use it for debugging sometimes. Perhaps you can modify that one and send me the result. Nor do the makefiles that I use to build and test include targets for static linking. Regards. Ross