C++ - Can you build one static library into another?

前端 未结 6 2050
时光说笑
时光说笑 2020-12-16 00:43

I ran into a strange problem with a Visual Studio 2008 project I was working with recently.

I am trying to compile a new static library that uses functions from anot

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 01:34

    Instead of simply documenting your dependencies, use #pragma comment(lib, 'lib2name') in your code to make the linker pull in the other library automatically. Since you said you're using a standard library that comes with the SDK, this should eliminate all burden on the application.

提交回复
热议问题