From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31530 invoked by alias); 6 Feb 2009 12:51:27 -0000 Received: (qmail 31518 invoked by uid 22791); 6 Feb 2009 12:51:27 -0000 X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS X-Spam-Check-By: sourceware.org Received: from eu1sys200aog111.obsmtp.com (HELO eu1sys200aog111.obsmtp.com) (207.126.144.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Feb 2009 12:51:23 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKSYwySOkYDqHWsF5xc0uoag5RixahtqnV@postini.com; Fri, 06 Feb 2009 12:51:22 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 01ACBDADA for ; Fri, 6 Feb 2009 12:50:38 +0000 (GMT) Received: from mail3.gnb.st.com (mail3.gnb.st.com [164.129.119.57]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 2FFD34C3BE for ; Fri, 6 Feb 2009 12:51:19 +0000 (GMT) Received: from [10.129.100.6] (GNB401739.gnb.st.com [10.129.100.6]) by mail3.gnb.st.com (MOS 3.8.7a) with ESMTP id CND27992 (AUTH richarda); Fri, 6 Feb 2009 13:51:17 +0100 (CET) Message-ID: <498C3246.6070700@st.com> Date: Fri, 06 Feb 2009 12:51:00 -0000 From: Arnaud RICHARD User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 Cc: pthreads-win32@sourceware.org Subject: Re: Does static library works ? References: <498C08A3.4030509@st.com> <2148c4de0902060211l38c61302p24fdd29d9d5d35bf@mail.gmail.com> In-Reply-To: <2148c4de0902060211l38c61302p24fdd29d9d5d35bf@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org X-SW-Source: 2009/txt/msg00004.txt.bz2 I have tried with MinGW. It doesn't pass either. (but pass in dynamic of course). So it is not due to something specific to MSVC. Looking more closely... I found out than some functions must be called only when linking statically: pthread_win32_process_attach_np() pthread_win32_process_detach_np() pthread_win32_thread_attach_np() pthread_win32_thread_detach_np() There is some explanations in the file README.NONPORTABLE It's the first time ever I see code specific to static linking... maybe because I'm a newbie on MS platform. I post this solution for future Arnaud > Arnaud RICHARD wrote: > >> Dear developers, >> >> I tried to build my program statically with pthreads.lib. >> It crash at run-time in "pthread_cond_init()". >> So I tried to run the tests. >> First surprise: the test suite only run with DLL, and not with .LIB. >> I have enhanced the makefile to run the tests in static. >> Second surprise: most tests fails (but not all). >> >> Has anyone tried to do it ? >> I attached the modified makefile, the target to run is "make clean >> VC-static" >> >> Any feedback welcome, >> Arnaud >> >> PS: I use MSVC2008, and compile "VC-static" >> >> >>