遇到一个新问题。本问题已经解决
2015-03-26 20:56
197 查看
--------------------Configuration: QShowDib - Win32 Debug--------------------
Compiling...
QDib.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
D:\QShowDib\QDib.cpp(23) : error C2065: 'm_hDIB' : undeclared identifier
D:\QShowDib\QDib.cpp(52) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\QShowDib\QDib.cpp(86) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
QShowDib.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
QShowDibDoc.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
QShowDibView.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
Generating Code...
执行 cl.exe 时出错.
出错地点:
#if !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)
#define AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class QDib
{
protected:
HDIB m_hDIB;
CPalette * m_palDIB;
public:
QDib();
virtual ~QDib();
BOOL Load(LPCTSTR lpszFileName);
BOOL LoadFromResource(UINT nID);
CPalette * GetPalette();
BOOL Show(CDC *pDC,int x,int y,int cx=0,int cy=0);
int Width();
int Height();
void DeleteDIB();
};
#endif // !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)
QShowDib.exe - 1 error(s), 0 warning(s)
本问题已解决:
在QDib.h头部加上头文件
#include"dibapi.h"
Compiling...
QDib.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
D:\QShowDib\QDib.cpp(23) : error C2065: 'm_hDIB' : undeclared identifier
D:\QShowDib\QDib.cpp(52) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
D:\QShowDib\QDib.cpp(86) : error C2440: '=' : cannot convert from 'struct HDIB__ *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
QShowDib.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
QShowDibDoc.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
QShowDibView.cpp
d:\qshowdib\qdib.h(15) : error C2146: syntax error : missing ';' before identifier 'm_hDIB'
d:\qshowdib\qdib.h(15) : error C2501: 'HDIB' : missing storage-class or type specifiers
d:\qshowdib\qdib.h(15) : error C2501: 'm_hDIB' : missing storage-class or type specifiers
Generating Code...
执行 cl.exe 时出错.
出错地点:
#if !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)
#define AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class QDib
{
protected:
HDIB m_hDIB;
CPalette * m_palDIB;
public:
QDib();
virtual ~QDib();
BOOL Load(LPCTSTR lpszFileName);
BOOL LoadFromResource(UINT nID);
CPalette * GetPalette();
BOOL Show(CDC *pDC,int x,int y,int cx=0,int cy=0);
int Width();
int Height();
void DeleteDIB();
};
#endif // !defined(AFX_QDIB_H__506061F8_7436_435B_B817_94C7814FB87F__INCLUDED_)
QShowDib.exe - 1 error(s), 0 warning(s)
本问题已解决:
在QDib.h头部加上头文件
#include"dibapi.h"
相关文章推荐
- 【已经解决】安装oracle中遇到的一个小问题。。。
- 遇到的一个JS原型的问题,已经解决
- ajax2级联动,遇到一个异步优先级问题,使用settimeout 解决
- 一个cocoapods问题的解决,希望能帮助到遇到相似情况的人
- 遇到一个特别傻的问题。。。用charles抓包抓不到https的解决方法
- 笔记:做一个MFC串口界面遇到的一些问题和解决思路
- 如何解决安装CentOS时遇到引导分区位于一个GPT分区方案的错误提示问题
- 我遇到一个棘手的问题等待解决
- Cocos2dx编译到android遇到的一个坑爹问题以及解决方法
- 关于“任何软件工程遇到的问题都可以通过增加一个中间层来解决”的明悟
- 使用mina时遇到“您的主机中的软件放弃了一个已建立的连接”问题解决
- 解决github下创建一个项目版本库遇到的权限问题
- 最近做的一个linux下的聊天系统,遇到的一些问题及解决办法
- 解决一个问题的思路 之“解决已经写满con.close() 仍然出现"但是尚未从池中获取连接"的连接池耗尽问题”
- 遇到一个郁闷问题,最后在郁闷中解决!
- ASP.NET遇到问题,“对象不能从 DBNull 转换为其他类型”,记录一下~问题已经解决,谢谢大家~
- 安卓添加事件遇到的一个问题以及他的解决方法
- 在部署Web工程时遇到的一个小问题,及解决方法
- 一个cocoapods问题的解决,希望能帮助到遇到类似情况的人