* DLL vs. static: READMES need more instructions for static
@ 2005-05-21 22:24 neal olander
0 siblings, 0 replies; only message in thread
From: neal olander @ 2005-05-21 22:24 UTC (permalink / raw)
To: pthreads-win32; +Cc: rpj
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:
IF YOU WANT STATIC LINKED LIBRARY
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
Neal Olander
olanderfamily@hotmail.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-05-21 22:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-21 22:24 DLL vs. static: READMES need more instructions for static neal olander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).