2

My .exe-project depends on external static libraries A.lib and B.lib.

The problem: Library B internally also uses library A and exports its symbols. But the version of A used is different from A.lib - and incompatible with my app.

When linking my application with both A.lib and B.lib, the A-symbols included in B.lib hide the proper symbols in A.lib. Although linking succeeds, my app doesn't work correctly.

Factoring out all usage of B.lib into another static library C.lib doesn't help: C.lib still exports all symbols from B.lib.

Can this be solved without the following workarounds?

  • Dynamic linking.

  • Re-building B with my version of A.lib. (I have access to the source of B.)

    This might cause unknown side-effects in B.

(In my concrete case A.lib is Freetype and B.lib is SFML - but the issue is universal.)

K-ballo
  • 80,396
  • 20
  • 159
  • 169
Kay Sarraute
  • 1,232
  • 8
  • 16

0 Answers0