C1189在构建期间 [英] C1189 during build

查看:153
本文介绍了C1189在构建期间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在最新的Windows 10上安装了最新的VS 2017.当我编译以前正在使用的C ++(在其他机器上工作,所有使用Windows XP,Windows 7与VS 2017及更早版本)时,我收到错误C1189 "你需要Windows
Vista或更高版本来运行此存根,因为它使用这些功能。"更具体地说,该项目是Media Player DSP插件。失败的项目与原始项目具有相同的名称,但以"PS"结尾。

I've just installed the latest VS 2017 on the latest Windows 10. When I compile a previously working C++ (worked on other machines and all using Windows XP, Windows 7 with VS 2017 and earlier versions), I get error C1189 "You need Windows Vista or later to run this stub because it uses these features." To be more specific the project is a Media Player DSP plug-in. The project that fails has the same name as the original project but ends with "PS".

推荐答案

嗯,C1189是用户定义的错误代码。

Well, C1189 is the user defined error code.

#ifndef MYDEF
#error MYDEF not defined
#endif

int wmain()
{
	return 0;
}

这将导致报告C1189,并且报告的消息是提供的消息。在这种情况下,Visual Studio的输出是:

This will cause a C1189 to be reported, and the message reported is what is provided. In this case the output from Visual Studio is:

1> ------ Build build:Project:TestApp,Configuration:Debug Win32 ------

1> main.cpp

1> c:\ usersrs \ darran\source \ _repos\testapp\testapp \ main.cpp(2):致命错误C1189:#error:  MYDEF未定义

1>完成建筑项目"TestApp.vcxproj" - 失败。

==========构建:0成功,1失败,0最新,0跳过==========

1>------ Build started: Project: TestApp, Configuration: Debug Win32 ------
1>main.cpp
1>c:\users\darran\source\repos\testapp\testapp\main.cpp(2): fatal error C1189: #error:  MYDEF not defined
1>Done building project "TestApp.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

如果您双击错误消息或错误列表中显示的错误,那么它将带您到代码中的确切位置报告错误。但这是源本身产生的错误,因此您需要检查代码的
作者。

If you double click on the error message, or the error that appears in the Error List, then it will take you to the exact location in the code where the error is reported. But this is an error produced by the source itself, so you need to check with the author of the code.


这篇关于C1189在构建期间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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