还是那个GDI的问题
我把GDI的头文件拷贝到VC98里的include文件夹下,吧库文件拷贝到VC98下面的lib文件夹下。重现建立了一个单文本框程序
Stdafx.h文件如下:
#if !defined(AFX_STDAFX_H__7DBD9734_B583_4123_81D1_BF02805EBA03__INCLUDED_)
#define AFX_STDAFX_H__7DBD9734_B583_4123_81D1_BF02805EBA03__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#include <Windows.h>
#pragma comment(lib, "gdiplus.lib")
#define ULONG_PTR ULONG
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxdtctl.h>
#include "Gdiplus.h"
using namesapace Gdiplus;
#pragma comment(lib, "gdiplus.lib")
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
//#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__7DBD9734_B583_4123_81D1_BF02805EBA03__INCLUDED_)
其中using namesapace Gdiplus;这句编译出错:
d:\vc\study\1\dd\xx\stdafx.h(22) : error C2146: syntax error : missing ';' before identifier 'Gdiplus'
d:\vc\study\1\dd\xx\stdafx.h(22) : error C2873: 'namesapace' : symbol cannot be used in a using-declaration
d:\vc\study\1\dd\xx\stdafx.h(22) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
xx.exe - 1 error(s), 0 warning(s)
请高手指教,谢谢!