Question

The code compiles fine but gives this error on run: freeglut (filename): failed to open display ''

How do I set the display and get it to run? Also trying to open xterm gives the same error (tried this as advice found said to run in an xterm).

Was it helpful?

Solution

You need a running X server, so that X11 based programs can display output. However if your goal is OpenGL development on Windows then you should not use a X server, because, unfortunately, none of the existing X servers for Windows does support modern OpenGL features in their implementation of GLX client and server components.

I strongly suggest you target native Windows GDI when compiling for windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top