ERROR: undefined reference to 'auxDIBImaheLoadA'
-
Hi there.., i am learning opengl from the NeHe tutorials(NO GLUT). i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling. i am using codeblocks. the codeblock is:
AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;
if(!Filename)
{
return NULL;
}
File = fopen(Filename,"r");
if(File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}
return NULL;
}I have added libglaux.a already in the linker settings. HELP!!!!
-
Hi there.., i am learning opengl from the NeHe tutorials(NO GLUT). i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling. i am using codeblocks. the codeblock is:
AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;
if(!Filename)
{
return NULL;
}
File = fopen(Filename,"r");
if(File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}
return NULL;
}I have added libglaux.a already in the linker settings. HELP!!!!
Perhaps you are missing a header file.
Ratul Thakur wrote:
i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling.
What is the EXACT error message you are receiving?
Ratul Thakur wrote:
I have added libglaux.a already in the linker settings.
Which is irrelevant because you are dealing with a compiler error. The linker does not kick in until the compiler succeeds.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Perhaps you are missing a header file.
Ratul Thakur wrote:
i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling.
What is the EXACT error message you are receiving?
Ratul Thakur wrote:
I have added libglaux.a already in the linker settings.
Which is irrelevant because you are dealing with a compiler error. The linker does not kick in until the compiler succeeds.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
no m not missing the header (-_-) m not that noob. i know the
#include
header file.
-
Hi there.., i am learning opengl from the NeHe tutorials(NO GLUT). i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling. i am using codeblocks. the codeblock is:
AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;
if(!Filename)
{
return NULL;
}
File = fopen(Filename,"r");
if(File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}
return NULL;
}I have added libglaux.a already in the linker settings. HELP!!!!
-
Hi there.., i am learning opengl from the NeHe tutorials(NO GLUT). i am getting the error undefined reference to 'auxDIBImageLoadA' while compiling. i am using codeblocks. the codeblock is:
AUX_RGBImageRec *LoadBMP(char *Filename)
{
FILE *File=NULL;
if(!Filename)
{
return NULL;
}
File = fopen(Filename,"r");
if(File)
{
fclose(File);
return auxDIBImageLoad(Filename);
}
return NULL;
}I have added libglaux.a already in the linker settings. HELP!!!!
auxDIBImaheLoad comes from the GLAUX library which is obsolete and no longer supported by Visual studio which is why it can't find it. Even adding include "GLAux.H" wont help as the library file has been removed as well as the DLL. If you are just playing around the source code and precompiled GLAUX.DLL are available on the internet but anything beyond that do not use it. All that function does is loading an image file as a texture one second let me fashion you a replacement it will take longer to explain how to do it that to do it. Can you tell me what lesson this is from on the NeHe site and I will post result to them to update it on next message
In vino veritas
-
auxDIBImaheLoad comes from the GLAUX library which is obsolete and no longer supported by Visual studio which is why it can't find it. Even adding include "GLAux.H" wont help as the library file has been removed as well as the DLL. If you are just playing around the source code and precompiled GLAUX.DLL are available on the internet but anything beyond that do not use it. All that function does is loading an image file as a texture one second let me fashion you a replacement it will take longer to explain how to do it that to do it. Can you tell me what lesson this is from on the NeHe site and I will post result to them to update it on next message
In vino veritas
Okay I found you are trying to do Lesson6 and the function LoadGLTextures() basically puts a texture into this variable GLuint texture[1]; // Storage For One Texture I have given you a new function which directly loads the texture bool NeHeLoadBitmap(LPTSTR szFileName, GLuint &texid); The call to it looks like NeHeLoadBitmap(_T("Data/NeHe.bmp"), texture[0])) Yes I unicoded the whole thing and set optimal screen resolution again and its in VS2013 project :-) Code link: http://s000.tinyupload.com/?file\_id=94912123294851978142 I have a little job to do this weekend I guess which is to patch each lesson and send them to the site :laugh:
In vino veritas
-
Okay I found you are trying to do Lesson6 and the function LoadGLTextures() basically puts a texture into this variable GLuint texture[1]; // Storage For One Texture I have given you a new function which directly loads the texture bool NeHeLoadBitmap(LPTSTR szFileName, GLuint &texid); The call to it looks like NeHeLoadBitmap(_T("Data/NeHe.bmp"), texture[0])) Yes I unicoded the whole thing and set optimal screen resolution again and its in VS2013 project :-) Code link: http://s000.tinyupload.com/?file\_id=94912123294851978142 I have a little job to do this weekend I guess which is to patch each lesson and send them to the site :laugh:
In vino veritas
Thanks a lot for your effort.., i ll try this one out and tell you if it works:thumbsup::thumbsup::thumbsup:
-
Okay I found you are trying to do Lesson6 and the function LoadGLTextures() basically puts a texture into this variable GLuint texture[1]; // Storage For One Texture I have given you a new function which directly loads the texture bool NeHeLoadBitmap(LPTSTR szFileName, GLuint &texid); The call to it looks like NeHeLoadBitmap(_T("Data/NeHe.bmp"), texture[0])) Yes I unicoded the whole thing and set optimal screen resolution again and its in VS2013 project :-) Code link: http://s000.tinyupload.com/?file\_id=94912123294851978142 I have a little job to do this weekend I guess which is to patch each lesson and send them to the site :laugh:
In vino veritas
YEH!!!!!!!! it worked. Thanks once again. But what is the use of "_T". if i compile without including it, the application still works fine.
-
YEH!!!!!!!! it worked. Thanks once again. But what is the use of "_T". if i compile without including it, the application still works fine.
The _T is a macro provided by TCHAR.H for unicode/multilingual support. If you go to the project settings->general tab->Character set you will have that to "not set" setting. That macro allows you to use the other choices being unicode and multi-byte character sets making your code work multilingual like in chineese windows. For you in ascii mode the macro actually does nothing (which you worked out) but if you select the other modes you will see you will get an error on every static text the _T tells the compiler to make the string in the correct mode and removes the error. Being a commercial programmer and as Microsoft has made it so easy for doing it we generally try and use the multilingual code calls since Visual Studio 2013. This became almost compulsory when trying to write true 64 bit applications. The default setting of an empty project is actually to set for unicode character set. Essentially TCHAR becomes a replacement for the standard char and its size varies in the compilation modes. They provide new string functions that match the old string functions in TCHAR.H but have different code for the different modes. Lets give you an example strlen becomes _tcslen those calls work identical the difference being _tcslen will work in any language mode compilation, while strlen will only work in language "not set" mode like you have. Here is the link to what is going on from MSDN strlen, wcslen, _mbslen, _mbslen_l, _mbstrlen, _mbstrlen_l[^] This code is designed specifically for windows (it uses the Win32 API), it is not general in nature like that could work on linux so there is no reason to write generically but we should try and cover the different modes of windows compilation, especially as it is easy. So for me the changes are just habit. There is a funny part of this that so many of us are writing in that style that the linux community is having issues trying to port our code. So if writing general code I would probably try to avoid this style of programming.
In vino veritas