3

I want to program somthing using opengl es , i search software center for anything related
and i found libgles1-mesa-dev , then i wrote a simple main program and included :

#include <GLES/gl.h>  
#include <GLES/glext.h>  

and it compiles , but if i try to use an opengl es function it says undefined reference . (meaning the include without using functions compiles , but after writing a function it gives that error)

i compiled using simple

gcc ./*.c -o xxx  

how can i use this library to program opengl es 1.x ?
or opengl es in general ?

0

2 Answers 2

3

i did this and it worked :

 1) sudo apt-get install libgles1-mesa libgles1-mesa-dev
 2) sudo apt-get install freeglut3 freeglut3-dev
 3) gcc ./*.c -o "XXX" -L/usr/lib/x86_64-linux-gnu/ -lGLESv1_CM -lglut  

those steps on ubuntu 13.04 64bit , because the "-L/usr/lib/x86_64-linux-gnu/"
changes depending on your distro.

1

You should include the flag of gles and the library.

  gcc ./*.c -o xxx `pkg-config --cflags --libs gles`
1
  • hi, i tried this and got : "Package gels was not found in the pkg-config search path. Perhaps you should add the directory containing `gels.pc' to the PKG_CONFIG_PATH environment variable No package 'gels' found" Jun 13, 2013 at 12:25

Not the answer you're looking for? Browse other questions tagged .