My program is built as a loader and many modules which are shared libraries. Now one of those libraries uses pthreads and it seems its bound to the module dynamically (loaded on startup). Now it'd be simplier if i could force pthreads to be linked into the module file. GCC on linux, how do i do? I guess a libpthread.a is necessary....
While linking libpthread.a
into a shared library is theoretically possible, it is a really bad idea. The reason is that libpthread
is part of glibc
, and all parts of glibc
must match exactly, or you'll see strange and un-explainable crashes.
So linking libpthread.a
into your shared library will:
glibc
glibc
is upgraded, but your module is not re-linked against updated libpthread.a
.Spare yourself aggravation, and don't do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With