3

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.

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
Spectral
  • 717
  • 2
  • 12
  • 28
  • Have a look at this post: http://stackoverflow.com/questions/4002757/how-to-add-zlib-to-an-existing-qt-installation Basically, you don't have to link to it again. Just use the headers and you should be fine. – Bart May 06 '11 at 09:55
  • Thanks, I have try to remove 'zlibstat.lib' but then... I have some other link errors, like "unresolved external symbol _zipWriteInFileInZip@12..." – Spectral May 06 '11 at 10:18

0 Answers0