VC驿站

 找回密码
 加入驿站

QQ登录

只需一步,快速开始

搜索
查看: 879|回复: 0

还是那个GDI的问题

[复制链接]
48_avatar_middle
最佳答案
0 
在线会员 发表于 2022-12-14 19:00:57 | 显示全部楼层 |阅读模式
我把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)
请高手指教,谢谢!




上一篇:GDI+编程编译错误
下一篇:注册热键问题
您需要登录后才可以回帖 登录 | 加入驿站 qq_login

本版积分规则

×【发帖 友情提示】
1、请回复有意义的内容,请勿恶意灌水;
2、纯数字、字母、表情等无意义的内容系统将自动删除;
3、若正常回复后帖子被自动删除,为系统误删的情况,请重新回复其他正常内容或等待管理员审核通过后会自动发布;
4、感谢您对VC驿站一如既往的支持,谢谢合作!

关闭

站长提醒上一条 /2 下一条

QQ|小黑屋|手机版|VC驿站 ( 辽ICP备09019393号-4 )|网站地图wx_jqr

GMT+8, 2023-12-11 11:46

Powered by CcTry.CoM

© 2009-2021 cctry.com

快速回复 返回顶部 返回列表