Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problems deploying app on Windows XP and Mac
Hello dear helpful and amazing developers,
I've successfully managed to deploy my first application for Windows, it works fine on Windows 7 but unfortunately I noticed it doesn't work on Windows XP. It seems that msvcp100.dll (and, maybe, msvcr100.dll) are missing. The problem can be fixed by installing Microsoft Visual Studio SP1 but this solution is not very satisfactory. So I tried to add manually these two dlls (I got them is the System32 directory on my computer with Windows 7) in my app "bundle" (not sure that's the correct term but whatever), along with the other dlls (QtCore QtGui...) But now there is another error message, something like "C:\Program Files\My App\MSVCP100.DLL is not designed to run on Windows or it contains an error..." (approximate translation from French).
Does anyone know how to fix this? It would be much appreciated!
I'll seize the opportunity to try my luck again with the problem I have when deploying on Mac (no answers yet): I'm using the macdeployqt tool, but it seems that it fails to deploy the jpeg image format plugin (which it is supposed to do automatically as far as I understand). As a result the function QImage::load() fails. I've been trying to "manually" add the libqjpeg.dylib file to the app bundle and set the paths (using otool), unsuccessfully. The thing is, I understand very little about what I'm trying to do (e.g., why the f is jpeg support a "plugin"? Why don't I have any problems deploying on Linux? etc.)
Does anyone know how to fix this (small but very annoying) problem? Thanks in advance!
Mac. I don't exactly know how to help you here, but you might try compiling qt without -qtjpeg flag just to see what happens. Also, you can use install_name_tool instead of otool
You would need to install MS Visual Studio 2010 on any windows XP and copy the DLLs from there. I don't know if VS2010 even works on XP, though. You can always try to set up an XP installation (in a virtual machine for example) and recompile your app there, maybe even using MSVC 9 (2008).
Hi sierdzio, thanks for helping! So, I think I'll try to get the DLLs from the PC where Visual Studio SP1 is installed, see what happens.
OK, so, I'm getting there, still having problems though.
Mac: Problems was fixed by a friend of mine. Needed to add libqjpeg.dylib to the app bundle manually (and set the paths using install-name-tool etc like the doc says) because macdeployqt didn't do it, but it only works if you put it in plugins/imageformats.
Windows XP: I installed Microsoft Visual Studio SP1 on XP, got the msvcp100.dll and msvcr100.dll from that computer, added them to the application bundle.
But now I'm having trouble with Windows 7 again!
A friend of mine (with Windows 7 Pro 64 bits) told me he had the "msvcp100.dll missing" error message (I thought these dlls where automatically there on Windows 7), so I got the dlls from my computer (on Windows 7 64 bits), and added them to the application bundle. But then he has an error "the application could not start correctly (0xc000007b)..." or something.
Here's my guess, but I could be wrong: that guy has no win32 support on his Windows. When I run dependency walker on my PC, it tells me the application needs qtcore4.dll, qtgui4.dll, msvcp100.dll, msvcr100.dll, and kernel32.dll. So I'm thinking, I need to add kernel32.dll as well. But this dll depends (as dependency walker says) on a lot of other dlls (like 20-30dlls such as API-MS-WIN-CORE-THREADPOOL-L1-1-0.DLL). Should I just try to add all of these? What should I do?
And by the way, I would like to try to avoid solutions like "tell users to install this pack/patch" on their computers.
Hm, that is strange indeed. Usually including msvcp + msvcr + Qt DLLs is enough, and it works across Windows versions (a build made on XP works well on Win 7 and Win 8 for example).
I'm no expert on Windows, but another idea would be to install VC++ redist (redistributable) package (sorry, I know you have asked not to do it) on user machine. I notice that most applications (all games, and many other programs) do force that installation automatically in their installers. You can get this package from MS download site.
Hi Sierdzio, thanks again for your help.
Well, I guess asking users to install VC++ redist should work, but I'd like to be sure there is no other solution. Does anybody have an idea? Is it worth trying to try to include kernel32.dll and all related libraries for instance?
KeithS last edited by
You need to ship users the VC++ redistributable for 32 or 64 bits, for the version of VC++ you are compiling with. They will install the dll's correctly when they are run by the end users, and is the way Microsoft recommends.
You do not need to add any other dll's other than the ones the redistributables installer supplies.
Thanks for your answer! Just a small stupid question (sorry): when you say "ship users the VC++ redistributable", do you mean just ask them to install some package that can be found on the internet, or is there a more "automatic" way to do that?
KeithS last edited by
You can either point them at the link to download the vcredist package:
or you can download them yourself and ship the vcredist .exe with your software, and ask them to install that before running your s/w.
Of course if you use an installer you can make all this automatic, but that's beyond the scope of this thread.
Cool, thank you. I do use an installer, so I'll try to make the procedure automatic.