如何“结合"两个静态库? [英] How to "combine" two static libraries?

查看:98
本文介绍了如何“结合"两个静态库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我知道你不能依赖于另一个静态库,但我想知道是否有什么东西可以让我将它们组合在一起.我正在尝试在 vstudio 2019 中设置一个游戏引擎项目文件,我想将其编译为静态库.我需要以某种方式将它与 SDL 2 库结合起来,因为我想使用 SDL 创建一些系统.有没有办法做到这一点?感谢您的帮助.

so I know that you can't depend a static library to another one but i was wondering if there is something that lets me combine them together. I am trying to setup a game engine project file in vstudio 2019 and i want to compile it as a static library. I need in some way to combine it with SDL 2 library because I want create some systems using SDL. Is there a way I can do that? Thanks for the help.

推荐答案

创建库时,可以在项目的Librarian"属性中指定Additional dependencies".依赖项可能是另一个库.还将链接库依赖项"设置为是",以便包含整个库.

When creating a library, you can specify "Additional dependencies" in the "Librarian" properties of the project. The dependency may be another library. Also set "Link Library Dependencies" to "Yes" so that the whole library is included.

这篇关于如何“结合"两个静态库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆