My problem was simple. In the build process there was the call to cmd /c mimetypes\mime\generate.bat which generates the qmimeprovider_database.cpp
That failed because the PowerShell ExecutionPolicy was restricting executions. That bat script could be manually run for both debug and release but then there was other scripts that failed. So I temporarily disabled the PowerShell restrictions and the compile succeeded.
Added after 22 minutes:
Dynamic vs static... Yes previously I have sometimes copied the .dll files from the Qt library together with the dynamic Qt build and it has worked. For some reason now with Qt5 when I did not have a static library and quickly I needed to run my program on another machine this did not work any more. Anyway, the library is updated so frequently that the odds that two Qt programs will have the same dll versions is getting so small that a static build will occupy less space on the disk. It is crazy thinking that a simple win32 hello world static Qt5 application takes 18 MB and needs more that 10 floppy disks to be distributed. A few years ago I was making a much more advanced win32 applications with same look & feel, using Borland C++ Builder, and those would take 100kb disk space and you could fit 10 such programs on a floppy disk.
Bookmarks