From: Arnaud RICHARD <arnaud.richard@st.com>
Cc: pthreads-win32@sourceware.org
Subject: Re: Does static library works ?
Date: Fri, 06 Feb 2009 12:51:00 -0000 [thread overview]
Message-ID: <498C3246.6070700@st.com> (raw)
In-Reply-To: <2148c4de0902060211l38c61302p24fdd29d9d5d35bf@mail.gmail.com>
I have tried with MinGW.
It doesn't pass either. (but pass in dynamic of course).
So it is not due to something specific to MSVC.
Looking more closely... I found out than some functions must be called
only when linking statically:
pthread_win32_process_attach_np()
pthread_win32_process_detach_np()
pthread_win32_thread_attach_np()
pthread_win32_thread_detach_np()
There is some explanations in the file README.NONPORTABLE
It's the first time ever I see code specific to static linking... maybe
because I'm a newbie on MS platform.
I post this solution for future
Arnaud
> Arnaud RICHARD <arnaud.richard@st.com> wrote:
>
>> Dear developers,
>>
>> I tried to build my program statically with pthreads.lib.
>> It crash at run-time in "pthread_cond_init()".
>> So I tried to run the tests.
>> First surprise: the test suite only run with DLL, and not with .LIB.
>> I have enhanced the makefile to run the tests in static.
>> Second surprise: most tests fails (but not all).
>>
>> Has anyone tried to do it ?
>> I attached the modified makefile, the target to run is "make clean
>> VC-static"
>>
>> Any feedback welcome,
>> Arnaud
>>
>> PS: I use MSVC2008, and compile "VC-static"
>>
>>
>>
next prev parent reply other threads:[~2009-02-06 12:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 9:53 Arnaud RICHARD
2009-02-06 10:11 ` MaaTt
2009-02-06 12:21 ` Arnaud RICHARD
2009-02-06 12:51 ` Arnaud RICHARD [this message]
2009-02-06 13:06 ` John E. Bossom
2009-02-07 0:24 ` Ross Johnson
2009-02-07 0:32 ` Ross Johnson
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=498C3246.6070700@st.com \
--to=arnaud.richard@st.com \
--cc=pthreads-win32@sourceware.org \
/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).