public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: Stephan Brauss <sbrauss@optronic.ch>
To: pthreads-win32@sources.redhat.com
Subject: static linking with mingw32
Date: Thu, 16 Jan 2003 17:09:00 -0000	[thread overview]
Message-ID: <3E26E70E.49F9DEE8@optronic.ch> (raw)

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

             reply	other threads:[~2003-01-16 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-16 17:09 Stephan Brauss [this message]
2003-01-17 17:58 ` Stephan Brauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E26E70E.49F9DEE8@optronic.ch \
    --to=sbrauss@optronic.ch \
    --cc=pthreads-win32@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).