[英]What opengl library should i use with an nvidia graphics card
I'm trying to compile an SDL2 and OpenGL game on linux, but the error that shows up is always 我正在尝试在Linux上编译SDL2和OpenGL游戏,但是显示的错误始终是
/usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status
/ usr / bin / ld:找不到-lGL collect2:错误:ld返回1退出状态
Which led me to find out which opengl version I have. 这导致我找出我拥有哪个opengl版本。 But it shows this:
但是它显示了这一点:
OpenGL version string: 4.5.0 NVIDIA 375.39
OpenGL版本字串:4.5.0 NVIDIA 375.39
But I don't know which parameter or library to use with nvidia opengl. 但是我不知道要在nvidia opengl中使用哪个参数或库。
Does anyone know? 有人知道吗?
Fixed it easily by just swapping out -lGL with -l:libGL.so.1. 只需将-lGL与-l:libGL.so.1换出即可轻松修复。 But find out what library you have using
但是找出您使用的是什么库
ls /usr/lib/
ls / usr / lib /
and then look for libGL.so.version_number_here 然后在这里寻找libGL.so.version_number_number
Works for me until I need to add it to my linker. 为我工作,直到需要将其添加到我的链接器中为止。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.