游戏开发论坛

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

OpenGL中的一个莫名的问题哟! 痛死我也!!!! 求助!!!

[复制链接]

5

主题

6

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2005-9-28 23:12:00 | 显示全部楼层 |阅读模式
大家好,
    我的编程环境为:VC++ ,OpenGL.
    我在用 以下的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 了,可就是不行,老是出现上面问题,!!!!!!!!请求帮忙呀!谢
谢!!!!!



[em1] [em13] [em15] [em17] [em10] [em22]

18

主题

573

帖子

573

积分

高级会员

Rank: 4

积分
573
发表于 2005-9-29 00:47:00 | 显示全部楼层

Re:OpenGL中的一个莫名的问题哟! 痛死我也!!!! 求助!!!

1、
#include <windows.h>
#include <gl\gl.h>
#include <gl\glaux.h>
2、
在setting的Link中添加glaux。lib时保证添加到所有库的前面。
试试看!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-12-27 23:44

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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