This is the mail archive of the pthreads-win32@sourceware.org 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]

Re: Does static library works ?


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"




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