0

当您在未安装 VS 或 CRT 的操作系统上运行 C++ 程序的调试版本时,您还会收到调试断言错误框吗?

那些说“调试断言失败!”的人。

还是只有在机器安装了某些组件(例如 CRT 或 Visual Studio)时才能获得它们?

4

2 回答 2

2

这取决于您如何构建应用程序。如果您动态链接到调试 CRT,那么除非他们是开发人员,否则用户不太可能在他们的系统上拥有调试 CRT(事实上,由于 VS 的许可,您无法分发它)。所以在这种情况下它甚至不会运行。如果您静态链接到 CRT,那么如果您已经向他们发送了调试版本,那么用户将看到断言。

于 2010-07-15T16:12:06.660 回答
1

If you can get it to run, yes. Compiling with /MDd (the default) requires distributing the debug version of the dynamic CRT. It is not a redistributable component, shipping it anyway is a license violation. You could get around it by compiling with /MTd.

Of course, your user will have no idea what "Debug assertion failed" means and won't understand why Ignore doesn't work. Best avoided.

于 2010-07-15T16:24:25.040 回答