Peter Berg Larsen pebl@math.ku.dk writes:
I might be missing something here: The only thing we see by compiletime is headerfiles. At runtime we try dlopen a library what we hope corresponce to the headerfiles. There is no garantee that it is.
That's why we get the soname at compile time, and dlopen that. It's not 100% foolproof, but it's the best we can do. But now if you open a different library, all bets are off, it has no reason to be compatible with the headers we used at compile time.