Reputation: 699
I'm using Visual Studio 2010, OpenCV 2.4.5, and QT 5.0.2. I'm trying to deploy my application by loading static libraries of OpenCV and QT. The problem is that both of them contain zlib (compression library) internally. So, when I compile the project, link error occurs, since symbols are conflicted as below.
zlibd.lib(zutil.obj) : error LNK2005: _z_errmsg is already defined in Qt5Cored.lib(zutil.obj).
However, both of OpenCV and QT do not provide static library without zlib. What can I do?
Upvotes: 1
Views: 1021
Reputation: 1638
Take a look at the OpenCV installation guide. It says, "You can use Qt as HighGUI backend on any platforms (Windows, Linux, Mac) by passing WITH_QT=ON
to CMake when configuring OpenCV." The guide also has a link to a step-by-step guide.
So, do these steps and add WITH_QT=ON
to your OpenCV configuration.
Upvotes: 1