I want to start learning OpenGL. Codeblocks decided to break, so I downloaded Dev-C++ instead.

I've tried loads of different websites to try and figure out how to install it, and I get some type of error every time. How should I install it with dev-c++?

Dani AI

Generated

For (and to follow up on question): the common problems when moving OpenGL work into Dev-C++ are not Dev-C++ itself but missing headers/libs, mismatched 32/64-bit binaries, and using an old toolchain that doesn’t provide modern context creation helpers. Dev-C++ 4.9.9.2 bundles a MinGW GCC (usually 32-bit), so make sure any OpenGL libraries you add match that bitness.

Basic, practical checklist:

  • Confirm compiler bitness (Dev-C++ install folder / MinGW/bin will show whether it is 32-bit). Use matching libraries and DLLs.
  • For classic OpenGL you need Windows system libs plus a window/context helper: link against opengl32 and glu32 and add a GLUT replacement such as freeglut (GLUT itself is not bundled). If headers/libs are missing, download freeglut and copy the headers to your MinGW include/GL folder, the import .a/.lib to MinGW lib, and put the DLL beside your executable (safer than altering system folders). See freeglut here: freeglut (SourceForge).
  • In a Dev-C++ project add the linker libraries (for example opengl32, glu32 and freeglut/glut). If you get “cannot find GL/glut.h” or “undefined reference” errors, the header/lib pairing or the DLL location is the usual culprit.

If learning modern OpenGL, use a loader/context combo (GLFW + GLEW or glad) rather than GLUT. GLFW is a lightweight context/window library: GLFW. For general setup guidance and training material consult the OpenGL Getting Started notes: OpenGL - Getting Started.

If this still fails, consider switching to a maintained IDE/toolchain (Code::Blocks with MinGW-w64, or Visual Studio) — they avoid many of the old Dev-C++ quirks and make following current tutorials easier.

Recommended Answers

All 2 Replies

Which version of Dev-C++ did you install?

Which version of Dev-C++ did you install?

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.