PDA

View Full Version : how to running a debug Qt program on another pc with QT and visual studio platform?



bangqianchen
29th January 2010, 04:36
My current platform is QT4.6.0+Visual Studio 2008+ Win7, commercial version Qt. I want to run a debug version qt program on another PC that not installed Qt and Visual C++ environment. I had copy QtCored4.dll,QtGuid4.dll,QtSqld4.dll and Microsoft.VC90.DebugCRT.manifest, msvcm90d.dll, msvcp90d.dll and msvcr90d.dll files to the exe program folder. but the program failed running, the wrong message is "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem".

The text in Microsoft.VC90.DebugCRT.manifest file is :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<noInheritable></noInheritable>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
<file name="msvcr90d.dll" hashalg="SHA1" hash="af453f3ee64ff975e704d8241daee695e423e6b8"><asmv2:hash xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:Transforms>
....

However, the CMainFrame.exe.intermediate.manifest (CMainFrame is my program name) which is auto created by compiler, and locate in the compiler debug folder is like this:
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC90.DebugCRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
...

that mean's the version of depended files are different! May be this is the problem that lead the program failed. but I do not know how to solve it. Any help will be appreciate!

vishwajeet.dusane
29th January 2010, 07:19
Hi

first open your application in depend.exe (dependency walker). that will show you if any component is missing.

you might need to install missing msm files in debug version on windows 7 however in win 7 most of required msm is default installed. Check winSXS folder for your manifest and dll files specific to msvc.

faldzip
29th January 2010, 08:38
If you build it (Qt and application) on Windows 7 and want to run on previous version of windows then you might have problem like you have :] I have a Windows 7 x64 and Qt built from sources with VS2005 and I'm unable to run my app on windows XP even with all the dependencies verified with Dependency Walker (and it is depends.exe with "s" at the end :P). The solution is to rebuild your app on Windows XP in this case.

bangqianchen
29th January 2010, 09:06
I fellow this way
http://www.nuonsoft.com/blog/2008/10/29/binding-to-the-most-recent-visual-studio-libraries/
by adding the _BIND_TO_CURRENT_VCLIBS_VERSION macro for compiling and find the lib version in program folder is 9.0.21022.8, and copy corresponding dll from Winsxs folder to the exe folder. the program also failed. It sames that this way can only suitable for release program.