Windows Static Library with Default Functions

非 Y 不嫁゛ 提交于 2019-12-01 20:06:54

I figured out a solution (not sure if it is the only or best solution).

I was trying to define FOO and BAR in foobar.lib using one object file (foobar.obj). If I split it up into foo.obj and bar.obj and then use those to create foobar.lib the linker can effectively ignore the appropriate .obj files.

So the short answer is: one function per object file for the static library.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!