C++ error in x64 LNK2005: inflateReset [LNK1169]

Hello,

I was trying to compile our project in Qt with static library TurboActivate 3.3.4 on Windows 7 x64, using MS Visual Studio 2010,unfortunately, following link error raises:

curllib-MD.lib(inflate.obj) : error LNK2005: inflateReset already defined in QtCore4.lib(QtCore4.dll) Creating library bin\Project.lib and object bin\Project.expbin\Project.exe : fatal error LNK1169: one or more multiply defined symbols foundNMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\link.EXE"' : return code '0x491'

Compilation on x86 is working well. Qt x64 was compiled by ourselves, but it takes very long. Is there any working solution, that will not require re-compilation Qt x64? Dynamic TurboActivate is working well.

On Qt webpage (http://qt-project.org/doc/qt-4.8/configure-options.html) there is option for "-qt-zlib" or "-system-zlib", but we set nothing, and I do not know, what is default option for zlib, or if some of that options will be helpful for this link error.

Thank you for your help and advice!

We include zlib in TurboActivate. The conflict you're seeing the that QT also includes zlib. So either get a build of QT that doesn't have zlib built in, or use the dll versions of QT and/or TurboActivate.

Hello,

Now, after we are having Qt x64 without zlib, there is missing zlib library on x86.That means, that TurboActivate x86-static doesn't have included zlib? Why is difference between x64 and x86 in that library?

libpng.lib(png.obj) : error LNK2019: unresolved external symbol _inflateReset referenced in function _png_reset_zstream

I think, this is not consistent...

Why is difference between x64 and x86 in that library?

None. It sounds like differences in your x86/x64 build of Qt. Also, make sure you're including the TurboActivate lib before including the Qt libs.