This is the mail archive of the
mailing list for the pthreas-win32 project.
Re: Static linking under win32
- From: Ross Johnson <rpj at callisto dot canberra dot edu dot au>
- To: "pthreads-win32 at sources dot redhat dot com" <pthreads-win32 at sources dot redhat dot com>
- Date: Mon, 06 Dec 2004 17:22:38 +1100
- Subject: Re: Static linking under win32
- References: <200412060337.iB63beF00812@callisto.canberra.edu.au>
- Reply-to: rpj at callisto dot canberra dot edu dot au
Hi,Yes, it should be in the FAQ.
I'm sure this is a commonly asked question: how do I build
pthreads-win32 under VC++ (7.1 in my case)? I am surprised you don't
ship a project file with the source-code or discuss this in the FAQ :)
Pthreads-win32 relies on dynamic linking to provide a seemless interface
to it's POSIX functionality - using dllMain to do some per process and
per thread initialisation and cleanup. Static linking requires your
application to call some non-portable routines (see README.NONPORTABLE:
pthread_win32_process_attach_np etc). That's one reason why static
linking is not really 'officially' encouraged.
However, there's a VS Workspace file provided that will build the DLL.
It was contributed by a user and I use it for debugging sometimes.
Perhaps you can modify that one and send me the result.
Nor do the makefiles that I use to build and test include targets for