glaux.h library for C++ Builder

As far, as I know, library “glut.h” isn’t working on C++ Builder because it is calling “Unresolved External” error on each function from this library (I have a “glut32.lib” on system folder).
But can I link up a “glaux.h” library? I have it, but I don’t have a “glaux.lib”. And where can I find a source code of Glaux module?

I need it, because I think, that working with Glaux module can be more simple. Using glu.h, to draw a sphere, we need this code:

    GLUquadricObj *quadObj;
    quadObj = gluNewQuadric();
   gluQuadricDrawStyle(quadObj, GLU_FILL);

   gluSphere(quadObj, 20,10,10);

Using glaux.h we need only this:


glaux is pretty old and last I heard, it had some memory leaks and I have no idea where the source code is.

I’m sure there is a .lib for your compiler if you search hard enough.
Also, you seem to be confusing GLUT and GLU. gluSphere is part of GLU.


you can try OpenGLUT or freeglut.


dj3hut1, the freeglut library isn’t for Builder.
I had installed OpenGLUT, and included files

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <gl\openglut.h>
#pragma comment(lib,"OpenGLUT.lib")
#pragma comment(lib,"OpenGLUT_static.lib")

in the Unit1.h in C++ Builder 6.
But there is an error:

[Linker Error] 'C:\PROGRAM FILES\BORLAND\CBUILDER6\LIB\OPENGLUT_STATIC.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

I have all libraries for OpenGLUT and *.h files.

So, I think now, that only, that I can do, is to get somewhere a source code for GLUT or GLAUX…
P.S. V-man: Yes, gluSphere is a part of GLU, but I write:

<…> Using glu.h, to draw a sphere <…>

It is strange, some borland compiler users seem to have succeed in using glut in C++ builder. did you follow this tutorial or this one (looks nicer :slight_smile: ).
I have found many articles about “how to integrate glut in C++ builder?” typing “glut+borland” in google.

Thank you, dletozeun. I didn’t know, that it can be. And I rarely using google - my search is

mmmh, yes you have more chances on google, yandex seems pretty limited… for my keyboard, at least! :slight_smile:

Hello Fraktalius,

do you have tried to insert



#include <gl\openglut.h>

? I think that is important.

Maybe you can also convert the library for the C+±Builder :


I’m working with C++ Builder and Glaux library works fine with Borland!
I solved the unresolved external error by adding the glaux.lib file to the project (Project->Add …)

I had added it many times, but there is an error:

[Linker Error] 'C:\WINDOWS\SYSTEM\GLAUX.LIB' contains invalid OMF record, type 0x50

If it’s still actual …

You’re using lib file built with MS VC or smth like this…Your options:

  1. Convert it via cofftoomf
  2. Download from internet BB demos which include compatible Glaux.lib - there are plenty of them …
    (If you have public ftp I can upload you mine)

P.S. Anyway Glaux is deprecated and used mostly for loading bitmaps,so I think it’s better to look for other options;here in forum GLFW and SDL are recommended,but I guess they are problematic for Borland Builder.I used Glaux few years ago when I did some project for university,now I’m doing new project for work and I’m using FreeImage since it supports many image types and not only BMP.

omf format glaux.lib can be downloaded for example here:

The file is actually called, but contains glaux.lib, which works with BCB 6.0. Hopefully this will help someone.

(Funny, that the file I was looking for had id = 42)