You need to install libgl (OpenGL API development files), check the documentation on how you do that in your system, for example in Ubuntu (most likely Debian and other derivatives have the exact package name) you do it like this:
@sudo apt-get install libgl1-mesa-dev@
okey. Thank you so much. it worked. i tried to get the names for the correct library for opengl but wasnt able to find that.
Environment is Ubuntu.
This worked.