From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 868 invoked by alias); 16 Jan 2003 17:09:11 -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 678 invoked from network); 16 Jan 2003 17:09:00 -0000 Received: from unknown (HELO ns2.radioschefer.ch) (62.2.224.35) by sources.redhat.com with SMTP; 16 Jan 2003 17:09:00 -0000 Received: from www (unverified [172.17.3.19]) by ns2.radioschefer.ch (Rockliffe SMTPRA 4.5.4) with SMTP id for ; Thu, 16 Jan 2003 17:57:43 +0100 Received: from 192.168.200.46 (192.168.200.46) by www via Avirt Mail smtp (4.2); Thu, 16 Jan 2003 17:03:25 GMT Message-ID: <3E26E70E.49F9DEE8@optronic.ch> Date: Thu, 16 Jan 2003 17:09:00 -0000 From: Stephan Brauss Organization: OPTRONIC AG X-Accept-Language: de MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: static linking with mingw32 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003/txt/msg00011.txt.bz2 Hello! Does someone know, how I can link my program statically with libpthreadGC? Like I have done for other libraries, I have built a static one with the following command: i386-mingw32msvc-ar crus libpthreadGC_s.a attr.o barrier.o cancel.o cleanup.o condvar.o \ create.o dll.o errno.o exit.o fork.o global.o misc.o mutex.o nonportable.o private.o \ rwlock.o sched.o semaphore.o signal.o spin.o sync.o tsd.o Then, I tried to compile and link the example join0.c: i386-mingw32msvc-gcc join0.c -o join0.exe -lpthreadGC i386-mingw32msvc-g++ join0.c -o join0s.exe -x c++ -mthreads -D_DLL -DPTW32_BUILD -lpthreadGCE_s -lwsock32 join0.exe uses the dll, join0s.exe is linked statically. join0.exe works, join0s.exe produces a page fault. Has someone an idea what is wrong? Can't I use it statically? I tested with pthreads-snap-2002-11-04. Stephan