我不能在MFC中使用Texture [英] I can't use Texture in MFC
本文介绍了我不能在MFC中使用Texture的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hi
玩得开心
i想在Visual C ++ 2010的MFC中加载纹理
但是当我使用语法AUX_RGBImageRec时,出错发生了。但是它在没有MFC的项目中工作。
如何在MFC中使用它?我真的需要它。
错误是:不受欢迎
这是我使用的代码:
hi
have a good time
i want to load a texture in MFC of Visual C++ 2010
but when i use the syntax "AUX_RGBImageRec", error happens.but it works in project without MFC.
how can i use it in MFC?I realy need it.
error is : unresloved
this is code that i used:
AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image
{
FILE *File=NULL; // File Handle
if (!Filename) // Make Sure A Filename Was Given
{
return NULL; // If Not Return NULL
}
File=fopen(Filename,"r"); // Check To See If The File Exists
if (File) // Does The File Exist?
{
fclose(File); // Close The Handle
return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer
}
return NULL; // If Load Failed Return NULL
}
,错误信息是:
1> oglMFCDialogDlg.obj:错误LNK2019:未解析的外部符号_auxDIBImageLoadA @ 4在函数struct _AUX_RGBImageRec * __cdecl LoadBMP(char *)中引用(?LoadBMP @@ YAPAU_AUX_RGBImageRec @@ PAD @ Z)
推荐答案
错误是:unresloved
我觉得很难相信。尝试发布你写的实际代码和你收到的错误信息的确切措辞。
error is : unresloved
I find that difficult to believe. Try posting the actual code you have written and the exact wording of the error message you receive.
首先它需要Glaux.lib
之后我们必须从这里编译它:
项目菜单\属性\configuration properties \Linker \输入\附加依赖项
然后我们可以使用 AUX_RGBImageRec 在MFC项目中使用它。
at first it needs Glaux.lib
after that we have to compile it from here:
Project menu\properties\configuration properties\Linker\Input\Additional Dependencies
then we can use AUX_RGBImageRec in MFC Project and use it.
这篇关于我不能在MFC中使用Texture的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文