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]

Re: Static linking under win32


Gili wrote:

Hi,

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 :)


Yes, it should be 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 static linking.

Regards.
Ross


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