5

I have a static library A and a dynamic library B that links to A (on Linux A/libA.a and B/libB.so, on Windows A/A.lib and B/B.dll). On Linux I can cause B to contain all the symbols in A by using this link line:

g++ -shared -o libB.so B_init.o ... -Wl,--whole-archive -L../A -lA -Wl,--no-whole-archive

How would I do the equivalent on Windows? (Assume that I have correctly exported the symbols in A with the correct __declspec(dllexport) decorations.)

Brian Bassett
  • 661
  • 1
  • 6
  • 18
  • possible duplicate of [What is the Visual studio equivalent to GNU ld option --whole-archive](http://stackoverflow.com/questions/3867254/what-is-the-visual-studio-equivalent-to-gnu-ld-option-whole-archive) – LThode Nov 21 '14 at 17:15

0 Answers0