This is the mail archive of the
mailing list for the pthreas-win32 project.
pthread library static linking
- From: Meno Abels <meno dot abels at adviser dot com>
- To: pthreads-win32 at sources dot redhat dot com
- Date: Fri, 23 Apr 2004 07:45:13 +0200
- Subject: pthread library static linking
i'am new here so one question is allowed-:)
I want to use pthread-win32 not as a dll. I want
to link the pthread-win32 functionality static
to my application just to make distribution of that
So that is quite easy to get, but there are the DllMain.
In DllMain you use the DLL_THREAD_ATTACH/DLL_THREAD_DETACH.
These prevents to use your lib static linked. Not technical
but functional. The DLL_PROCESS_ATTACH/DETACH is simple to
simulate infact I will call it on startup and end of my
application direct. The thread stuff is more complex i have to
change the thread create and thread exit code of your library.
My basic question is why you choose this solution with
DllMain. The pthread library is a wrapper around the
windows functions so it would be obvious to add the needed
initialisation for the create and exit directly.
Why is this done with DllMain?
Thanks in advance