|
|
大家好,
我在用 以下的NeHe的方法载入位图图象 时遇到麻烦了呀!!!!:
AUX_RGBImageRec *LoadImage(char *Filename) // 载入位图
{
FILE *File=NULL; // 文件句柄
if (!Filename) //文件名已给了吗?
{
return NULL; // 若没有则返回NULL
}
File=fopen(Filename,"r"); // 检查文件是否存在
if (File) // 文件存在吗?
{
fclose(File); // 关闭文件
return auxDIBImageLoad(Filename); // 载入位图并返回位图的指针
}
return NULL; // 若载入失败则返回NULL
}
////////////////////////////////////////////////////////
//////////////////////////////////////////////////////
在 编译时老是出现下面问题:
--------------------Configuration: OGLFrm - Win32 Debug-------------------
-
Compiling...
StdAfx.cpp
c:\gamelib\graph.h(38) : error C2143: syntax error : missing ';'
before '*'
c:\gamelib\graph.h(38) : error C2501: 'AUX_RGBImageRec' : missing storage-
class or type specifiers
c:\gamelib\graph.h(38) : error C2501: 'LoadBMP' : missing storage-class
or type specifiers
Error executing cl.exe.
OGLFrm.exe - 3 error(s), 0 warning(s)
什么意思呢?你们有没出现过呀?怎么解决的?我已在Graph.cpp文件的前面加上
glaux.h了呀,也在Setting中的Link
中添加glaux.lib 了,可就是不行,老是出现上面问题,!!!!!!!!请求帮忙呀!谢
谢!!!!!
[em5] [em10] [em24] |
|