Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Linker error while building WITH_QT

Hi folks,

I'm currently trying to build revision a31b29308f with the WITH_QT CMake flag on a Windows 7 x64 machine.

I use Microsoft Visual Studio 2012 (VS11) compiler and the qt-opensource-windows-x86-msvc2012_opengl-5.4.1 package. The QT install folder is added to the path. Once I generate the cmake files i recieve a couple of 'Policy CMP0020 not set' warnings. So far so good (I've pasted the cmake log at http://pastebin.com/3kFAhzns). When I move onto building OpenCV I start to receive linker errors that look like this:

LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_highgui300d.lib'
(I've pasted the entire log here: http://pastebin.com/PL3wq6EN)

No wonder, when the error occurs, there's no such *.lib file present!
But when I don't use the WITH_QT flag, everything works fine.
Any suggestions why?

Many thanks, best regards,
Viktor

[Solved] Linker error while building WITH_QT

Hi folks,

I'm currently trying to build revision a31b29308f with the WITH_QT CMake flag on a Windows 7 x64 machine.

I use Microsoft Visual Studio 2012 (VS11) compiler and the qt-opensource-windows-x86-msvc2012_opengl-5.4.1 package. The QT install folder is added to the path. Once I generate the cmake files i recieve a couple of 'Policy CMP0020 not set' warnings. So far so good (I've pasted the cmake log at http://pastebin.com/3kFAhzns). When I move onto building OpenCV I start to receive linker errors that look like this:

LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_highgui300d.lib'
(I've pasted the entire log here: http://pastebin.com/PL3wq6EN)

No wonder, when the error occurs, there's no such *.lib file present!
But when I don't use the WITH_QT flag, everything works fine.
Any suggestions why?

Many thanks, best regards,
Viktor

Edit:
Building Qt from source instead of using pre-build x86 ones resolved the issue.