加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

winapi – 错误D8016:’/ ZI’和’/ clr’命令行选项不兼容

发布时间:2020-12-16 05:44:37 所属栏目:百科 来源:网络整理
导读:我的程序中出现以下错误: error D8016: '/ZI' and '/clr' command-line options are incompatible 当我放置以下行并在配置中启用通用运行时时会发生这种情况(一般)(如果我不启用它,那么使用系统和System :: Drawing将会出现错误) #using system.drawing.dll
我的程序中出现以下错误:
error D8016: '/ZI' and '/clr' command-line options are incompatible

当我放置以下行并在配置中启用通用运行时时会发生这种情况(一般)(如果我不启用它,那么使用系统和System :: Drawing将会出现错误)

#using <system.drawing.dll>
using namespace System;
using namespace System::Drawing;

其实我会在我的代码中使用一些需要上述dll的windows库.

如何解决这个问题?

#include "opencv2/highgui/highgui.hpp"
#include <opencv2/imgproc/imgproc_c.h>
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <ctype.h>
#using <system.drawing.dll>
using namespace System;
using namespace System::Drawing;
using namespace std;

int main( int argc,char** argv )
{
IplImage *source = cvLoadImage( "Image.bmp");
// Here we retrieve a percentage value to a integer
int percent =20;
// declare a destination IplImage object with correct size,depth and channels
  IplImage *destination = cvCreateImage
( cvSize((int)((source->width*percent)/100),(int)((source->height*percent)/100) ),source->depth,source->nChannels );
//use cvResize to resize source to a destination image
cvResize(source,destination);
// save image with a name supplied with a second argument
   cvShowImage("new:",destination);
  cvWaitKey(0);
 return 0;
 }

解决方法

在视觉工作室关闭/ ZI:

>打开项目的属性页对话框.>单击C/C++文件夹.>单击常规属性页.>修改调试信息格式属性 – 将其设置为“无”

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读