From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29785 invoked by alias); 21 May 2005 22:24:57 -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 29777 invoked by uid 22791); 21 May 2005 22:24:52 -0000 Received: from bay104-f5.bay104.hotmail.com (HELO hotmail.com) (65.54.175.15) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sat, 21 May 2005 22:24:52 +0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 21 May 2005 15:24:50 -0700 Message-ID: Received: from 65.54.175.201 by by104fd.bay104.hotmail.msn.com with HTTP; Sat, 21 May 2005 22:24:50 GMT X-Originating-Email: [olanderfamily@hotmail.com] X-Sender: olanderfamily@hotmail.com From: "neal olander" To: pthreads-win32@sources.redhat.com Cc: rpj@callisto.canberra.edu.au Bcc: Subject: DLL vs. static: READMES need more instructions for static Date: Sat, 21 May 2005 22:24:00 -0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 21 May 2005 22:24:50.0614 (UTC) FILETIME=[E7521560:01C55E53] X-SW-Source: 2005/txt/msg00090.txt.bz2 Hey. I've been using pthread on XP for several months now ... great library!!! thanks for all the hard work! My application must be totally stand-alone, and we cannot deliver DLLs with our executable. So I need a static version of pthreadVC2.lib. Until yesterday, I was using pthreadVC2.dll. I've got version 2.1.0 (16 March 2005) of Pthread lib. It seems to me that static versions of pthread library on Windows are discouraged: The Makefile only makes a DLL (and pthreadVC2.lib ... which is just a wrapper for the DLL). Why is a static library avoided? It took me many, many hours of hard work to get a static pthread.lib built in Visual C++ ... and I'm not 100% sure it is correct. I had to have my application call int status = pthread_win32_process_attach_np(); at the beginning to get it to work. This took me forever to figure out. This guidance is buried in README.NONPORTABLE, so I cant claim it is totally missing. May I suggest (in a very positive, helpful tone :-) that you add to the readme: IF YOU WANT STATIC LINKED LIBRARY 1) undef _DLL 2) your appl must call pthread_win32_process_attach_np(); 3) In the key pthread header files, put in # ifdef PTW32_BUILD # define PTW32_DLLPORT extern # else # define PTW32_DLLPORT # endif in lieu of the PTW32_BUILD stuff that is there now. 4) define PTW32_BUILD when building pthread static lib; undefine when building your application. ============================== THanks again for a great library!!! My comments are simply given to try to help others that come along later that will want a static pthread library. neal Neal Olander olanderfamily@hotmail.com