MasteringOpenCV/code

Open GL compilation error

YonatanSimson opened this issue · 5 comments

In order to get the example from chapter 3 to compile one should replace

#include <gl/gl.h>
#include <gl/glu.h>

with:

#include <GL/gl.h>
#include <GL/glu.h>

hello,I compiled chapter 3's codes in the environment of Linux. I used your method,but it didn't work.so,which system did you use? Windows?or Linux? And the author of this book said that we need install Opencv with opengl support. But,I failed.Help me!!! @YonatanSimson Thanks!

You should compile OpenCV source codes with OpenGL support and then use it. That's it! You can use CMake for compiling OpenCV with OpenGL support on Windows platform.

Thank you very much!! I succeed! @ahmetozlu

I ran into many GL header related errors using Visusal Studio 2019.

The solution in my case was to simply: #include <windows.h> before GL.

HTH