From: "neal olander" <olanderfamily@hotmail.com>
To: pthreads-win32@sources.redhat.com
Cc: rpj@callisto.canberra.edu.au
Subject: DLL vs. static: READMES need more instructions for static
Date: Sat, 21 May 2005 22:24:00 -0000 [thread overview]
Message-ID: <BAY104-F5C753D667123687FE664EA60A0@phx.gbl> (raw)
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
reply other threads:[~2005-05-21 22:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BAY104-F5C753D667123687FE664EA60A0@phx.gbl \
--to=olanderfamily@hotmail.com \
--cc=pthreads-win32@sources.redhat.com \
--cc=rpj@callisto.canberra.edu.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).