Two .lib containing different functions with the s

2019-07-02 01:24发布

I have two static libraries lib1.lib, lib2.lib (not their code) with the same function-prototypes, but with different implementations.

I tried including both, and it seems to use always the implementation from the first library included.

If I include both of them in my project, is there a way to choose the implementation from a specific library?

1条回答
唯我独甜
2楼-- · 2019-07-02 01:51

I think it should be possible to write thin wrapper DLL's that link against each of the static libraries. Notice that this will only work if lib1.lib and lib2.lib are static libraries and that such a wrapping will incur a performance hit.

查看更多
登录 后发表回答