PDA

View Full Version : QT + Zlib => error LNK2005: _deflate_copyright already defined in QtCored.lib(deflate



pl01
6th May 2011, 10:39
Hi,

When I link my application I receive the following message :

error LNK2005: _deflate_copyright already defined in QtCored.lib(deflate.obj) zlibstat.lib

I'm not sure of the problem, but ... I use QT and ZLib. Both are "static libraries". The problem is that the QTCore.lib contains ZLib too !

Project QT : contains its own version on ZLib
Project GenericLib : use an external ZLib.lib (cannot be linked to QT)
Project main : use QT + Generic lib

As I say, I'm not sure that it is the problem. But, anyway, if someone has an idea to help me ?

Thanks for your help

high_flyer
6th May 2011, 14:11
The problem is that the QTCore.lib contains ZLib too !
Either rebuild qt without zlib (see the configure flag help) or don't link to the external zlib.