This is the mail archive of the 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]

DLL vs. static: READMES need more instructions for static

Hey. I've been using pthread on XP for several months now ... great library!!! thanks for all the hard work!

My application must be totally stand-alone, and we cannot deliver DLLs with our executable. So I need a static version of pthreadVC2.lib. Until yesterday, I was using pthreadVC2.dll.

I've got version 2.1.0 (16 March 2005) of Pthread lib.

It seems to me that static versions of pthread library on Windows are discouraged: The Makefile only makes a DLL (and pthreadVC2.lib ... which is just a wrapper for the DLL). Why is a static library avoided?

It took me many, many hours of hard work to get a static pthread.lib built in Visual C++ ... and I'm not 100% sure it is correct. I had to have my application call
int status = pthread_win32_process_attach_np();
at the beginning to get it to work. This took me forever to figure out. This guidance is buried in README.NONPORTABLE, so I cant claim it is totally missing.

May I suggest (in a very positive, helpful tone :-) that you add to the readme:

1)  undef _DLL
2) your appl must call  pthread_win32_process_attach_np();
3) In the key pthread header files, put in

#  ifdef PTW32_BUILD
#    define PTW32_DLLPORT extern
#  else
#    define PTW32_DLLPORT
#  endif

in lieu of the PTW32_BUILD stuff that is there now.
4) define PTW32_BUILD when building pthread static lib; undefine when
building your application.

THanks again for a great library!!!
My comments are simply given to try to help others that come along later that will want a static pthread library.


Neal Olander

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