Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ERROR: undefined reference to 'auxDIBImaheLoadA'

ERROR: undefined reference to 'auxDIBImaheLoadA'

Scheduled Pinned Locked Moved C / C++ / MFC
helpgraphicsgame-devlearning
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Ratul Thakur
    wrote on last edited by
    #1

    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!!!!

    D L L 3 Replies Last reply
    0
    • R Ratul Thakur

      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!!!!

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • D David Crow

        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

        R Offline
        R Offline
        Ratul Thakur
        wrote on last edited by
        #3

        no m not missing the header (-_-) m not that noob. i know the

        #include

        header file.

        1 Reply Last reply
        0
        • R Ratul Thakur

          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!!!!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          It looks like the compiler is generating an ASCII version of the call to auxDIBImageLoad, so it may be that you need a different library to be linked with. Check the GL documentation.

          1 Reply Last reply
          0
          • R Ratul Thakur

            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!!!!

            L Offline
            L Offline
            leon de boer
            wrote on last edited by
            #5

            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

            L 1 Reply Last reply
            0
            • L leon de boer

              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

              L Offline
              L Offline
              leon de boer
              wrote on last edited by
              #6

              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

              R 2 Replies Last reply
              0
              • L leon de boer

                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

                R Offline
                R Offline
                Ratul Thakur
                wrote on last edited by
                #7

                Thanks a lot for your effort.., i ll try this one out and tell you if it works:thumbsup::thumbsup::thumbsup:

                1 Reply Last reply
                0
                • L leon de boer

                  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

                  R Offline
                  R Offline
                  Ratul Thakur
                  wrote on last edited by
                  #8

                  YEH!!!!!!!! it worked. Thanks once again. But what is the use of "_T". if i compile without including it, the application still works fine.

                  L 1 Reply Last reply
                  0
                  • R Ratul Thakur

                    YEH!!!!!!!! it worked. Thanks once again. But what is the use of "_T". if i compile without including it, the application still works fine.

                    L Offline
                    L Offline
                    leon de boer
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups