开发者

What is the Windows equivalent of the GNU ld flag --whole-archive?

开发者 https://www.devze.com 2023-01-03 05:23 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消