Answer

专注于Mobile,WinCE
  首页  :: 新随笔  :: 联系 :: 管理

[转]EVC 中 include 的错误

Posted on 2008-11-18 14:59  answer  阅读(798)  评论(0编辑  收藏  举报

EVC 中 include <Aygshell.h> 的错误
http://hi.baidu.com/wlcspace

aygshell.h(68) : error C2061: syntax error : identifier 'IShellPropSheetExt'

解决方法:
把 include <Aygshell.h> 添加到StdAfx.h中,把其他文件中的 include <Aygshell.h> 都删掉。
另外要注意,include <Aygshell.h> 要放到StdAfx.h中其他include的前面。

修改后的StdAfx.h如下:

#if !defined(AFX_STDAFX_H__5320ACCF_F901_4DD6_9770_78376A4F8121__INCLUDED_)
#define AFX_STDAFX_H__5320ACCF_F901_4DD6_9770_78376A4F8121__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include <aygshell.h>                 // 放到这里
#pragma comment(lib, "aygshell.lib")  // 放到这里

#define VC_EXTRALEAN  // Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions

//......

#endif