This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

static linking with mingw32


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]