0

i'm porting an old project from VS2010 to VS2022 but when building the solution i get plenty of LINK errors (unresolved externals) when linking Qt libraries maybe because they where build with VS2010. Does anybody know where can i find (if they exist somewhere) old versions of Qt libs and dll built with new versions of VS?

Error   LNK2001 unresolved external symbol "__declspec(dllimport) public: class QString & __cdecl QString::operator=(class QString &&)" (__imp_??4QString@@QEAAAEAV0@$$QEAV0@@Z)
genpfault
  • 51,148
  • 11
  • 85
  • 139
  • 3
    If the Qt installer itself doesn't have them, then you could just download the source and build yourself? – ChrisMM Apr 14 '23 at 15:42
  • though note that very old code might not build with a new compiler (I seem to remember Qt 4 doesn't compile in new versions of VS) – Alan Birtles Apr 14 '23 at 15:50
  • It might be easier to upgrade to Qt5, there weren't a huge number of breaking changes from Qt4 to Qt5 https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 – Alan Birtles Apr 14 '23 at 15:59
  • You cannot just mix and match objects built with different compilers (or even different versions of the same compiler, nor even objects built with the same compiler but with different options). Build (and link) *everything* with the exact same compiler and same compiler options, always (unless your tool-chain explicitly guarantees compatibility). – Jesper Juhl Apr 14 '23 at 16:15
  • See also: [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Jesper Juhl Apr 14 '23 at 16:17

0 Answers0