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-wh开发者_运维技巧ole-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.)
精彩评论