Results 1 to 5 of 5

Thread: deploying msvc apps compiled in debug mode on another machine

  1. #1
    Join Date
    Feb 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default deploying msvc apps compiled in debug mode on another machine

    hello!
    i'm developing an app using Qt for my company. in order to be able to get minidumps when the app crashes during testing on my colleagues' machines, i switched from mingw32 to msvc (visual studio 2008).
    if i'm not completely mistaken, the app needs to be compiled in debug mode in order for the minidump to make sense. but unfortunately i can't start the app on another machine if it's compiled in debug mode...
    the errors are:
    This application has failed to start because the configuration is incorrect. Reinstalling the application may fix this problem.
    and after shipping with the msvcrt and mfc dlls from the redist/debugNoRedist-folders including manifests in the bin-dir:
    The application could not be initialized properly(0xc0150002)
    i compiled the app with
    Qt Code:
    1. CONFIG+=embed_manifest_exe
    2. DEFINES += _BIND_TO_CURRENT_VCLIBS_VERSION
    To copy to clipboard, switch view to plain text mode 

    checking the .exe with depends.exe, i see that there are only two dlls missings, which are loaded on-demand and they are missing on my machine, as well, so this shouldn't be an issue.

    any hints?

    thanks,
    thomas

  2. #2
    Join Date
    Apr 2010
    Location
    Rostov-na-Donu, Russia
    Posts
    153
    Thanks
    2
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: deploying msvc apps compiled in debug mode on another machine

    I beat this problem by copying folder C:\Windows\winsxs to a target computer in the same place.
    But, if I don't mistaking, it's not a legal way. M$ said, that you can redistribute ONLY release version.

  3. #3
    Join Date
    Mar 2009
    Location
    Tennessee, US
    Posts
    41
    Thanks
    3
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: deploying msvc apps compiled in debug mode on another machine

    First ...
    Quote Originally Posted by cptG View Post
    checking the .exe with depends.exe, i see that there are only two dlls missings, which are loaded on-demand and they are missing on my machine, as well, so this shouldn't be an issue.
    I have found that using the depends.exe is unreliable for how that Microsoft uses side-by-side assemblies. So, a program always shows up with missing DLLs even though they aren't missing.

    Second...
    Instead of shipping with the msvcrt and mfc libraries, I would use the VC redistributable that Microsoft provides. To make a long story short on side-by-side assemblies, the Microsoft redistributables will be installed in the Windows directory where all applications can find them whereas the DLLs that you ship won't be.

    Finally...
    You need to make sure that you ship the MSVCRTD (debug version) dll library because it is a debug version.
    Amos
    Qt Programmer Extraordinaire

    Current Work:
    Ripxx Sports Measurement Device - www.ripxx.com
    (Featured in MYTHBUSTERS on 2010-05-19 in S08E08)

  4. #4
    Join Date
    Feb 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: deploying msvc apps compiled in debug mode on another machine

    first of all, i don't get the logic behind microsoft's assumption that debug-exes don't need to be distributed - like app-testing would only be done on the developer's machine... anyway...
    i did ship the debug-dlls, i made sure of that. in fact, while the despair was growing i just slapped all .dlls and manifests i could find in \Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86 into my app's bin-dir.
    about the WinSxS-solution: i don't wanna do that because, as borisbn said, it seems quite inelegant.
    the step i took now was to make a setup-project with visual studio and include the proper .msm there (though it didn't list it as dependency, just to be sure ) it made a nice msi-file with all files i told it to pack up, nice feature i must admit (i'm a visual studio noob)
    i just sent the .msi to my colleague for testing, along with the hint to make sure that the latest service pack and the latest .NET-framework 3.5 SP1 is installed, cause i found these to be sollutions for the 0x10something error-code.
    i'll let you know if this is solved the problem.

    edit: amoswood, i did install the vcredist_x86.exe on that machine, but it only ships release-dlls if i'm not mistaken (according to MS's logic i would assume that) and one for debug-dlls is (of course) nowhere to be found...

    cheers, cptG
    Last edited by cptG; 11th June 2010 at 16:47.

  5. #5
    Join Date
    Feb 2010
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: deploying msvc apps compiled in debug mode on another machine

    ok, i gave up on this one.
    especially since i just found out that i can generate debuginfo for a release build as well, so i can have meaningful minidumps from those, too.

    cheers, cptG

Similar Threads

  1. Replies: 14
    Last Post: 18th January 2011, 10:13
  2. compiled version of Qt 4.5 for msvc 2008
    By OniLink in forum Installation and Deployment
    Replies: 6
    Last Post: 26th March 2009, 09:31
  3. Failed to Launch qt 4.4.0 compiled executable in Debug mode
    By nikhilqt in forum Installation and Deployment
    Replies: 2
    Last Post: 25th July 2008, 14:45
  4. Deploying application on Linux machine without Qt
    By will49 in forum Installation and Deployment
    Replies: 2
    Last Post: 10th July 2008, 23:41
  5. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 18:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.