Ask Your Question

build 4.01 with vs2017 + WITH_QT & WITH_OPENGL errors

asked 2019-01-10 02:42:19 -0500

updated 2019-01-10 03:02:34 -0500

berak gravatar image

OPENCV_EXTRA_MODULES_PATH : opencv_contrib-master/opencv_contrib-master/modules; ERRORS:

Error   LNK1104 cannot open file '..\..\lib\Debug\opencv_highgui401d.lib' opencv_perf_imgcodecs ;
Error   LNK1104 cannot open file '..\..\lib\Debug\opencv_structured_light401d.lib'  opencv_test_structured_light

and other silimar 96 errors;

Error   C2065   'GL_PERSPECTIVE_CORRECTION_HINT': undeclared identifier opencv_highgui  opencv-master\opencv-master\modules\highgui\src opencv-master\opencv-master\modules\highgui\src\window_QT.cpp   3228
edit retag flag offensive close merge delete


the highgui lib could not be build because of the opengl related error, thus other modules dependant on it failed to build.

you could try to disable opengl:

berak gravatar imageberak ( 2019-01-10 03:54:00 -0500 )edit

you could also try to

#include <GL/gl.h>

and btw, which qt version is it, exactly ?

berak gravatar imageberak ( 2019-01-10 04:00:46 -0500 )edit

thanks; QT version is 5.12; i just want to interact with OPENGL; i had tried to add #include <gl gl.h=""> but more errors occured.

boyceZz gravatar imageboyceZz ( 2019-01-10 19:03:08 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-01-14 00:27:10 -0500

i have solved this problem. 1:separate to build WITH_QT then WITH_OPENGL; 2:not need to use extra module path.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-01-10 02:42:19 -0500

Seen: 283 times

Last updated: Jan 14 '19