4

I just installed SDL2, and am having a bit of trouble getting some of the test examples to run, specifically testgl2.c, which can be found in the test directory of the SDL2.0.0 source.

At first, I did my ./configure; make; sudo make install, then went to the test directory and ran make. It failed part way through, but the testgl2 executable was still built. When I ran it, I receive the error "No OpenGL support on this system.". Looking into the source, it looks like HAVE_OPENGL is not getting defined.

I found this thread which told me to install libglu1-mesa-dev, and this thread which also said to install freeglut3-dev and mesa-common-dev. I installed all of these, ran a make clean for the SDL installation, and did the ./configure; make; sudo make install, remade the test, but I still receive the same error message when running testgl2. I did noticed that the line

checking for OpenGL (GLX) support... no

changed to yes after I installed the packages.

I'm on Ubuntu 13.04, with an integrated graphics card.

Community
  • 1
  • 1
mp94
  • 1,209
  • 3
  • 11
  • 23

1 Answers1

1

At first, I did my ./configure; make; sudo make install, then went to the test directory and ran make.

I think you missed a step.

Do the top-level configure/make/make install, then repeat for the configure script in the test directory.

It looks like only test/configure will generate a Makefile with HAVE_OPENGL.

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Yup, that worked. I did run a ./configure in the test directory before, but that was before I installed the required OpenGL packages, and forgot to run it again afterwards. Thanks! – mp94 Aug 14 '13 at 21:46