QT not found when compiling OpenCV on another machine

asked 2015-08-03 05:09:10 -0500


I'm having trouble using a self-compiled cmake-based version of OpenCV 3.0. The whole compile procedure works fine, but when I'm trying to use the compiled libs and binaries on anotehr machine, then Qt (5.2.1) is not found at runtime.

The binary location are corrrectly specified in the path environment variable and $QTDIR is set correctly.

However, it works if Qt is compiled on my machine separately-

I think this is caused by the static Qt-Path that is set by cmake. Is there a way to have OpenCV look for Qt in, say, $QTDIR? cmake doesn't allow this and the setting is overwritten when I try to do it manually in the visual studio projects created by cmake.

I hope you can help!

edit retag flag offensive close merge delete



Building OpenCV on 1 machine, non statically and then linking it on another machine will never work ... to many configuration differences that can happen. Either rebuild it on each machine OR build your app statically.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-08-03 10:42:22 -0500 )edit