The library is compiled without QT support in function displayOverlay [closed]

asked 2015-04-21 02:31:43 -0600

Liimyd gravatar image

updated 2015-04-21 02:33:22 -0600

I am using static OpenCV 3.0 libraries with Qt 5.4. I am having compilation errors about cv::displayOverlay():

OpenCV Error: The function/feature is not implemented (The library is compiled without QT support) in displayOverlay, file C:\Programs\opencv\sources\modules\highgui\src\window.cpp, line 446
terminate called after throwing an instance of 'cv::Exception'
  what():  C:\Programs\opencv\sources\modules\highgui\src\window.cpp:446: error: (-213) The library is compiled without QT support in function displayOverlay

and

undefined reference to `_imp___ZN7QWidgetD2Ev'

Could it be that I am missing a static library? As a note, I compiled OpenCV myself and have made sure that WITH_QT was checked. I have no problems when using the dynamic libraries.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-26 08:10:55.538751

Comments

Actually that means that you added the with_QT option but that CMAKE didn't succeed in finding the complete QT installation itself. Run the CMAKE-gui interface, press configure and look which paths he doesn't find, then configure them manually.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-21 02:34:29 -0600 )edit
2

try a cerr << cv::getBuildInformation(); to check, if qt support was actually compiled in.

berak gravatar imageberak ( 2015-04-21 02:37:37 -0600 )edit

I checked my CMAKE paths and I believe they were correct. This is my full compilation error:

C:/Qt/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: C:\Programs\opencvMinGW\install\x64\mingw\staticlib\libopencv_highgui300.a(window_QT.cpp.obj): bad reloc address 0x15 in section `.text$_ZN10CvWinModelD0Ev[__ZN10CvWinModelD0Ev]'

I noticed that there was a CvWinModel class in window_QT.h but it doesn't help me much. This error is so cryptic and I've looked everywhere. I am not sure what else I can try. Any help would be really appreciated!

Liimyd gravatar imageLiimyd ( 2015-04-23 23:30:05 -0600 )edit

Did you run the code from @berak? If so what was the output?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-24 02:26:11 -0600 )edit
1

i must say, i'm confused now.

  • "OpenCV Error: The function/feature is not implemented" - this is a runtime error. this means, that the program must have compiled and linked at some stage before.

  • "undefined reference to `_imp___ZN7QWidgetD2Ev'" - this is a linker error, no program will be built.

  • "bad reloc address 0x15 in section" - again, a linker error.
berak gravatar imageberak ( 2015-04-24 02:33:27 -0600 )edit
1

@berak, sorry for the confusion! I had "OpenCV Error: The function/feature is not implemented" before I recompiled openCV. After recompiling OpenCV using WITH_QT = ON, I only had the linker error.

@StevenPuttemans Because of the linker errors, I haven't been able to enter runtime mode so I can't yet run cerr << cv::getBuildInformation();.

Liimyd gravatar imageLiimyd ( 2015-04-24 21:25:18 -0600 )edit

where to use the WITH_QT=ON option? @Liimyd

2ros0 gravatar image2ros0 ( 2018-02-05 20:55:56 -0600 )edit