0
votes

I'm trying to compile an SDL2 and OpenGL game on linux, but the error that shows up is always

/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status

Which led me to find out which opengl version I have. But it shows this:

OpenGL version string: 4.5.0 NVIDIA 375.39

But I don't know which parameter or library to use with nvidia opengl.

Does anyone know?

1
better suited on superuserMohit Yadav

1 Answers

0
votes

Fixed it easily by just swapping out -lGL with -l:libGL.so.1. But find out what library you have using

ls /usr/lib/

and then look for libGL.so.version_number_here

Works for me until I need to add it to my linker.