在 Visual Studio 2010 中引用调试/发布项目的正确方法?

发布于 2024-12-14 11:27:59 字数 473 浏览 3 评论 0原文

我有一个 Visual Studio 2010 解决方案,其中包含 72 个项目,其中大多数需要与其他项目链接。这些项目包含对属性 -> 公共属性 -> 中其他项目的引用。框架和参考文献。这些引用是该解决方案中其他项目的 dll 输出。

我的任务是在每个输出的末尾添加一个“d”,以将它们与其他配置区分开来,以避免在配置之间切换时出现链接器错误。

所以我将所有输出文件重命名为projectd.dll、project2d.dll等。我对导入库、projectd.lib、project2d.lib等做了同样的事情。

我进行了一次干净的重建并得到一个错误说在project.dll上使用失败。我发现它不像我预期的那样是projectd.dll。我检查属性->通用属性->框架和参考。所有引用仍然引用原始 dll,没有“d”扩展名。这些引用对于每个配置都是通用的,因此添加和删除可能不是一个好主意。完成这项任务的正确方法是什么?

非常感谢任何帮助。

I have a visual studio 2010 solution that contains 72 projects and most of them need to link with other projects. The projects contain references to the other projects in properties->Common Properties-> Framework and References. These references are dlls output from the other projects within this solution.

I have been tasked with adding a "d" to the end of each output to differentiate them from other configurations to avoid linker errors when switching between configurations.

So I've renamed all of the output files to projectd.dll, project2d.dll, etc. I have done the same with the import libraries, projectd.lib, project2d.lib etc.

I do a clean rebuild and get an error that says using failed on project.dll. I see that it isn't projectd.dll like I expected it to be. I check properties->Common Properties->Framework and References. All of the references still reference the original dlls, without the "d" extension. The references are common to each configuration, so adding and removing would probably be a bad idea. What is the correct way to go about this task?

Any help is greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

oО清风挽发oО 2024-12-21 11:27:59

我同意 @armel 评论:

我怀疑您直接在链接器或库中更改了输出文件名,这不是要做的事情,您必须更改“常规”面板中的“目标名称”。

谢谢阿梅尔。

I went with @armel's comment:

I suspect that you changed output file name directly in the linker or librerian, this is not the thing to do, you must change the "Target Name" in General panel.

Thank you armel.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文