views:

23

answers:

0

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.)