如何在Visual Studio 2008中合并C / C ++编译? [英] How to Merge C/C++ Compile in Visual Studio 2008?

查看:76
本文介绍了如何在Visual Studio 2008中合并C / C ++编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以allah的名义



大家好



i在包含C的项目上工作和C ++代码一起。

项目源是在visual sutdio2008中,当我添加C ++文件和C文件的代码时,项目错误如下。

i需要两个,请帮帮我。



i不要 #include< windows.h>

i甚至使用



in the name of allah

hi everyone

i work on a project that contains the C and C++ Codes together.
the project source is in visual sutdio2008 and when i add the C++ files and codes side of C Files, the projects errors like below.
i need the both , please help me.

i don't #include <windows.h>
i even use

#ifdef _windows_
#undef _windows_
#endif







C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxv_w32.h(20) : fatal error C1189: #error :  WINDOWS.H already included.  MFC apps must not #include <windows.h>





的原因#include< afxwin .h>

i使用需要afxwin.h的一些代码和函数。



属性项目是:/ MD使用标准库

我尝试了/ MT和共享dll库。



是什么问题?

谢谢



is it cause of #include <afxwin.h>?
i use the some codes and functions that need the afxwin.h.

the properties of project is : /MD use standard library
and i tried the /MT and shared dll library.

whats the problem?
thank you

推荐答案

确保所有afx包含在其他包含之前。
Be sure that all afx inclusions precedes the other include.


这篇关于如何在Visual Studio 2008中合并C / C ++编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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