gl\glaux.h: No such file or directory.
i get the error above when trying to compile any code with
#include <gl\glaux.h> in it???

Dani AI

Generated

The missing-file error means the compiler can't find the old GLaux header/library. As reported, Dev‑C++ (MinGW) typically doesn't include GLaux; as implied, that depends on the compiler distribution; and was right to point toward alternatives. Two practical paths follow: migrate off GLaux (recommended) or install the legacy files (quick-and-dirty).

A modern, robust approach

  • Replace GLaux helpers with current libraries: use a window/context toolkit (freeglut or GLFW), an extension loader (GLEW or GLAD) and a lightweight image loader (stb_image or SOIL). For built-in shapes, use GLU quadrics or build simple vertex geometry instead of relying on GLaux helpers.
  • Typical minimal headers:
    #include <GL/gl.h>
    #include <GL/glu.h>
    #include <GL/freeglut.h>   // or <GLFW/glfw3.h>
  • For MinGW/Dev‑C++ link flags (example): -lfreeglut -lopengl32 -lglu32 (add -lglew if using GLEW). Put the appropriate DLL next to your exe or in PATH.

If you must keep GLaux (legacy code)

  • Obtain a matching glaux.h and library built for your toolchain, then copy the header into MinGW's include/GL and the lib into lib. Add -lglaux -lopengl32 -lglu32 to linker options and ensure any required DLL is available at runtime.
  • Caution: GLaux is unmaintained, platform‑limited and has known bugs; this is only a stopgap.

Quick troubleshooting checklist

  • Use the conventional include path #include <GL/glaux.h> (forward slash, and the GL folder).
  • Verify the header actually resides in one of your compiler include directories or add its folder to the compiler’s include paths.
  • Match library binaries (DLL/lib) to your compiler (MinGW vs MSVC) to avoid linker/runtime errors.

These steps let Dev‑C++ compile modern examples without GLaux, or keep legacy code running while you port it.

Recommended Answers

All 3 Replies

What compiler are you using?

OpenGL is not standard with all compilers. You may have to download it.

where can you download it from?
i am using dev c++

glaux is a very old library and should substituted by others - glu, glut
but if you really want it, try opengl.org

if you use it to display spheres, cones etc, you can use quadrics from from glu
to load bitmaps, try win32 api (or other library)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.