Library order is important
- by Darryl Gove
I've written quite extensively about link ordering issues, but I've not discussed the interaction between archive libraries and shared libraries. So let's take a simple program that calls a maths library function:
#include <math.h
int main()
{
for (int i=0; i<10000000; i++)
{
sin(i);
}
}
We compile and run it to get the…