1

I did my search everywhere I could and I still have multiple problems with static compilling Qt under Windows (8.1, x64). I've tried a couple of articles describing how to do this, the last one (How to compile Qt 5 under Windows or Linux, 32 or 64 bit, static or dynamic on VS2010, VS2012, VS2013 or VS2015 Express or g++) was apparenty the closest to my case, but it's still not perfect. After applying changes pointed out here (Build static Qt project with Visual Studio 2015) I had errores:

Error   LNK2019 unresolved external symbol gethostname referenced in function "public: static class QString __cdecl QSysInfo::machineHostName(void)" (?machineHostName@QSysInfo@@SA?AVQString@@XZ)
Error   LNK2019 unresolved external symbol WSAStartup referenced in function "public: __cdecl QWindowsSockInit::QWindowsSockInit(void)" (??0QWindowsSockInit@@QEAA@XZ)
Error   LNK2019 unresolved external symbol WSACleanup referenced in function "public: __cdecl QWindowsSockInit::~QWindowsSockInit(void)" (??1QWindowsSockInit@@QEAA@XZ)
Error   LNK2019 unresolved external symbol WSAAsyncSelect referenced in function "public: void __cdecl QEventDispatcherWin32Private::doWsaAsyncSelect(int,long)" (?doWsaAsyncSelect@QEventDispatcherWin32Private@@QEAAXHJ@Z)

which were gone after including ws2_32.dll from Windows SDK. Ok, I'm able to run my project inside my Visual Studio now, but I can't run the exe-file (which was the original point of static linking) because of the following error:

This application failed to start because it could not find or load the Qt platform plugin "windows" in "".

Can somebody please help me? I spent several days trying to figure this out.

Community
  • 1
  • 1
Matty
  • 111
  • 1
  • 5

0 Answers0