游戏开发论坛

 找回密码
 立即注册
搜索
查看: 2996|回复: 1

特别声明:急! !! !!!

[复制链接]

5

主题

6

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2005-9-28 23:07:00 | 显示全部楼层 |阅读模式
大家好,
    我在用 以下的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]

82

主题

331

帖子

340

积分

中级会员

Rank: 3Rank: 3

积分
340
QQ
发表于 2005-10-1 00:41:00 | 显示全部楼层

Re:特别声明:急! !! !!!

你在那个 glaux.h 头文件中,能找到 AUX_RGBImageRec 的声明吗 ?
请用 #error 检查是否被明确声明了。
lib 你就不用管了,那个是实时连接的时候才会提示错误的。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-28 01:28

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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