Visual Studio 2010 是否打破了“项目依赖关系"?在 C++ 项目之间? [英] Did Visual Studio 2010 break "Project Dependencies" between C++ projects?

查看:35
本文介绍了Visual Studio 2010 是否打破了“项目依赖关系"?在 C++ 项目之间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Visual Studio 2008 中,如果我有一个包含多个 C++ 项目的解决方案,我可以使用项目依赖项"选项使它们相互依赖并正确链接.这修复了构建顺序,并且还创建了(例如)针对静态库输出的主应用程序项目链接.

In Visual Studio 2008, if I had a solution containing multiple C++ projects, I could make them depend on each-other and correctly link by using the "Project Dependencies" option. This fixed up the build order and also made (e.g.) the main application project link against the static library outputs.

在 Visual Studio 2010 中,这似乎不起作用.Visual Studio 2010 是否改变了它的工作方式?

In Visual Studio 2010, this doesn't seem to work. Did Visual Studio 2010 change the way this works?

推荐答案

是的.您还需要添加参考 到依赖项目.这不再仅适用于托管 C++(或 C++/CLI)应用程序.

Yes. You also need to add a Reference to the depended-upon project. This is not just for managed C++ (or C++/CLI) applications any more.

Visual C++ 团队博客有一个关于此的条目:灵活的项目到项目引用.

The Visual C++ Team Blog has an entry about this: Flexible Project-to-Project References.

这篇关于Visual Studio 2010 是否打破了“项目依赖关系"?在 C++ 项目之间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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