Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)


I am attempting to compile the Optix examples. In the optix folder, outside of SDK, ive made a build folder, then in that folder am running ccmake ../SDK. I am getting the error listed in the subject, and it will not compile. I have nvidia drivers 535 installed, as well as CUDA 12.3. I have attatched as well a screenshot showing what it looks like when I run ccmake; there are a couple things that can’t be found.

I’ve looked online and most things suggest there’s a missing library, i’ve made sure all of these are installed but it is still not working. I was wondering if anyone had thoughts on what else I could look into trying. Thanks!

Hi @luc.barrett57,

Indeed the error message is telling you which libraries are missing, namely opengl and glx - the OptiX SDK samples depend on these libraries, just be aware that your own OptiX apps do not need to depend on them. On Ubuntu I would normally install these, if they weren’t already installed by default, using something like apt install libopengl-dev and if necessary apt install libglx-dev. If you’re using a different package manager, swap apt for whatever package manager you’re using.