如何使用VC ++(2005)管理第三方构建中的调试库? [英] How to manage debug libraries in 3rd party build with VC++ (2005)?

查看:50
本文介绍了如何使用VC ++(2005)管理第三方构建中的调试库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,¥b $ b

我们正在构建第三方存储库,我们将自己的库放在其他应用程序中,我们发现了一个有趣的问题。通常我们提供调试和发布的lib版本来链接调试和发布,以避免运行时不匹配。

但我想得到一些关于如何构建调试库的建议。 br />通常构建器将lib上传到3rdparty构建完全调试,因此使用/ Zi标志。然后构建器具有静态lib和pdb文件用于调试目的。

在第三方中,只有上传的lib文件没有pdb文件。
现在这个lib的每个用户都得到了链接器警告LNK4099,因为pdb丢失,很好。基本上每个人都会收到警告,除了原始构建器有源和pdb链接到文件(只要内置源路径匹配)。

什么是管理它的好方法?有时我们的libs应该在其他库中使用时进行调试,以跟踪父lib中发生的错误或事情。
但是在回购中提供pdb对我来说似乎很奇怪,因为它的开销很大,如果要调试你也必须手动选择需要跳转到的源文件,并且实际上只存在于构建器工作站或代码存储库中的某个位置。

Hello,

we are building a third party repository where we put our own libraries which are then used within other apps and we found an interesting issue.
Usually we provide debug and release lib versions to link with debug and release and to avoid runtime mismatch.

But I would like to get some advice how the debug libs should be built.
Usually the builder, who uploads the lib to 3rdparty builds with full debug, so with /Zi flag. The builder has then the static lib and the pdb file for debugging purposes.

In the 3rd party there is only the lib file uploaded without the pdb file.
Now every user of this lib gets linker warnings LNK4099 because the pdb is missing, fine. Basically everybody gets the warning except the original builder who has the sources and pdb linked to the file (as long the built-in source path matches).

What is a good way to manage that? Sometimes our libs should be debugged during their use in other libs to trace errors or something occurring in the parent lib.
But providing also the pdb in the repo seems odd to me since its overhead and if it comes to debugging you also has to manually pick the source file which is required to jump into and does actually exist only on the builder’s workstation or somewhere in the code repository.


使用/ Z7编译不会创建pdb,但会创建更大的lib。 但是,如果现在第三方用户想要调试它,它就不起作用。我测试了这一点,当我从父lib中进入lib的代码时,我收到一条消息,这里没有代码,只有汇编程序的东西。我想,但是在构建器可以使用带有/ Z7标志的lib工作和调试但是没有其他人的情况下无法测试它,我是对的吗?但警告至少已经消失了。

最后一个解决方案是为每个人建立没有调试信息但是与调试运行时链接等等以避免不匹配。好吧,但这让所有人都没有任何调试可能性也不是很好。

实际上禁用LNK4099将是一个很好的解决方案:)(当然不起作用)

感谢任何建议。

感谢阅读:)
Sam

 

推荐答案

如果您希望消费者使用调试版本您需要将符号放在上面,否则它们将无法正确调试。您可以使用公司范围的符号服务器或复制.pdb以及链接。坦率地说,恕我直言,除非你分发
pdb,否则分发调试版本也没有价值。
If you wish the consumer to use debug builds you need to put the symbols up as well or they will not be able to debug correctly. You could use a company wide symbol server or copy the .pdb as well as the link. Frankly , IMHO, unless you distribute the pdb there is no value in distributing the debug version also.


这篇关于如何使用VC ++(2005)管理第三方构建中的调试库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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