with opengl condition, compilation failedICH

asked 2016-01-17 22:20:03 -0600

I tried to compile opencv 3.1.0 with OpenGL condition. But it failed;

[...] CMakeFiles/example_gpu_opengl.dir/opengl.cpp.o: In function draw(void*)': opengl.cpp:(.text._Z4drawPv+0x21): undefined reference toglRotated' CMakeFiles/example_gpu_opengl.dir/opengl.cpp.o: In function main': opengl.cpp:(.text.startup.main+0x622): undefined reference toglMatrixMode' opengl.cpp:(.text.startup.main+0x627): undefined reference to glLoadIdentity' opengl.cpp:(.text.startup.main+0x64c): undefined reference togluPerspective' opengl.cpp:(.text.startup.main+0x656): undefined reference to glMatrixMode' opengl.cpp:(.text.startup.main+0x65b): undefined reference toglLoadIdentity' opengl.cpp:(.text.startup.main+0x68d): undefined reference to gluLookAt' opengl.cpp:(.text.startup.main+0x697): undefined reference toglEnable' opengl.cpp:(.text.startup.main+0x6b8): undefined reference to glTexParameteri' opengl.cpp:(.text.startup.main+0x6cc): undefined reference toglTexEnvi' opengl.cpp:(.text.startup.main+0x6d6): undefined reference to `glDisable' collect2: error: ld returned 1 exit status samples/gpu/CMakeFiles/example_gpu_opengl.dir/build.make:121: recipe for target 'bin/gpu-example-opengl' failed make[2]: * [bin/gpu-example-opengl] Error 1

Any hint?

Thanks,

edit retag flag offensive close merge delete