Application doesn't run on other computers [SOLVED]
-
Hello !
So I created a new version of my application and I ported it to Qt5 . I also use Windows 8.
The code for my application is "here":http://sourceforge.net/p/captainshutdown/code/ci/master/tree/ .The problem is that I can run the application on my pc after I build the release version . However , if I give it to anybody else it won't run ( I put in all the necessary .dlls and resource files in the archive). It will give an "This application requested the Runtime to terminate it in an unusual way." error . Could you give me any hints please?
-
Not right now ... not really until I finish with my exams ... I was wondering if it is something that happens a lot ...
Also... when I run dependency walker it there are few red-written dependencies (I just saw this now)
IEHIMS.DLL
API-MS-WIN-CORE-SYNCH-L1-1-0.DLL
SHCORE.DLL
SHLWAPI.DLL
EXT-MS-WIN-ADVAPI32-PSM-APP-L1-1.0.DLL
IEFRAME.DLLAlso, these are not found in the Qt directory (at least I haven't found them)
-
Hi,
Dependency Walker doesn't get it 100% right. For example, IEHIMS.dll is NOT required. Furthermore, it doesn't automatically detect DLLs that need to be loaded after the application has started running (libEGL.dll, if I remember correctly)
Also note that if you compile your application on Windows 8, it probably can't run on Windows XP.
Read "Creating the Application Package":http://doc-snapshot.qt-project.org/qt5-stable/qtdoc/deployment-windows.html#creating-the-application-package for a list of required DLLs.
Note also that "This application requested the Runtime to terminate it in an unusual way" could be a sign of a memory bug in your code.
-
If it was a memory bug shouldn't it give me the same error on my computer as well?
And If I compile it on Windows 7 for example does it work on XP and 8 ?
Also, for win8 ... will it work for any of the earlier versions of Windows ? -
Hi,
The backward compatibility depends on the compiler used. What compiler are you using ?
-
[quote author="TwoOfDiamonds" date="1372403692"]If it was a memory bug shouldn't it give me the same error on my computer as well?[/quote]Not necessarily. Since memory is allocated dynamically, the program's memory pattern could be different on different machines.
Another possibility is that your program is linking to different versions of DLLs on the different machines.
[quote]And If I compile it on Windows 7 for example does it work on XP and 8 ?
Also, for win8 ... will it work for any of the earlier versions of Windows ?[/quote]Like SGaist said, it depends. For example, programs compiled with MSVC 2010 will only run on WinXP SP3 and later. Programs compiled with MSVC 2012 will only run on Win7 SP1 and later normally (well, MSVC 2012 can target older platforms too, but some features are disabled. Look up "Platform Targeting").Generally, compatibility between Windows 8 and Windows 7 is great, but I'm less certain about Vista and XP.
If your version of Qt uses ANGLE instead of straight OpenGL, then your program will be linked against the development machine's version of DirectX. Windows 7 and 8 ship with DirectX 11, but Windows XP only supports up to DirectX 9.0c. Programs linked against a newer DirectX won't run on a machine that has an older DirectX, but I think it can work the other way round -- so if you compile on XP I think it should work on Vista, 7 and 8.
The DirectX restrictions won't be there if you use OpenGL, but the target PCs must have graphics drivers installed that support OpenGL 2.0. The drivers bundled with Windows only support up to OpenGL 1.1 (which is why ANGLE was introduced in the first place)
-
I will try to use VirtualBox and compile it on windows xp . And I hope it will work . Thank for for your in depth answers !
I'm using VS2012 and I also have installed QtCreator ... which I think I will remove. I wonder ... how do I know from the first time what .dlls should I include if I use VS2012 ?
And what If I install the 32-bit version and use MinGW ? -
I reinstalled QtCreator and I installed the 32-bit version with MinGW and it works now ! :D
Thank you very much for all your answers and help !
-
You're welcome :) Glad to hear that it's working for you now!
If you still want to read up on deployment and dependencies, here's the "official guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html
You can add "[SOLVED]" to your post title by editing the original post.
-
Ok . I will do that . Also, do you usually use Visual Studio or QtCreator . And why ?
-
I usually use Qt Creator, mainly out of familiarity.
I started learning C++ through Qt, after a semester of formal education in C (read: using gVim and the console). I tried both VS and Qt Creator at the time. VS was more feature-rich, but I found it overwhelming as a newcomer. In contrast, Qt Creator had a simpler interface and felt less intimidating. So, I started using Qt Creator and gained experience in it, and never found a need to switch to VS.
Eventually, I also learnt that Qt Creator provides tight integration with Qt-based projects: Qt Designer (the WYSIWYG widget editor) is integrated into the IDE, and so is the offline Qt documentation. Such integration can only be partially achieved in VS through Qt's Visual Studio Add-In, which only works with paid versions of VS (which I don't have).
Once in a while, I'd be asked to work on existing VS-based projects. In those cases, I'd use VS since the solution is already set up. But otherwise, I'm a lot more productive on Qt Creator because I'm much more familiar with it, and because of Qt integration.