Results 1 to 6 of 6

Thread: Application works when started from VS2005, breaks when started from explorer

  1. #1
    Join Date
    Sep 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Question Application works when started from VS2005, breaks when started from explorer

    Maybe a dumb question, but I am not able to find a solution within forums:

    I've developed an app with Visual Studio 2005 SP1 using QT4.4 under WinXP SP2 32 Bit. Building and launching within VS2005 works without any problems, but starting the previously built application by clicking its icon in the Win Explorer gives the error

    Microsoft Visual C++ Runtime Library: Runtime Error!

    without any further information.

    Does that sound common to anyone? Thanks for reading.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Application works when started from VS2005, breaks when started from explorer

    are ur visual c++ libraries path properly set in environment variables ??

  3. #3
    Join Date
    Sep 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application works when started from VS2005, breaks when started from explorer

    %SystemRoot%\system32 is set within PATH. I think it would break with a message like "*.dll could not be found" if it weren't so

  4. #4
    Join Date
    May 2006
    Location
    Germany
    Posts
    108
    Thanks
    2
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Application works when started from VS2005, breaks when started from explorer

    Are you launching the program on the same machine?

    If no: check if you are trying to launch a debug version. Since Visual Studio 2005 it is impossible to ship a debug version to a computer that does not run Visual Studio.

    If yes: Check if the required Qt (and other) libraries are placed in the application directory (recommended) / system directory (if you are not afraid of dll hell) / PATH (if you are not afraid of dll hell).

    To figure out which libraries your program cannot find I suggest using Dependency Walker.
    "If you lie to the compiler, it will get its revenge." - Henry Spencer

  5. #5
    Join Date
    Sep 2008
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application works when started from VS2005, breaks when started from explorer

    Quote Originally Posted by Methedrine View Post
    Are you launching the program on the same machine?
    Yes I am.

    Quote Originally Posted by Methedrine View Post
    To figure out which libraries your program cannot find I suggest using
    Dependency Walker tells me, that every library can be found (except the well known msjava.dll issue)

  6. #6
    Join Date
    Jan 2008
    Posts
    56
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application works when started from VS2005, breaks when started from explorer

    Hi,

    what about the path where the application is started from?
    In VC, I assume you have a directory structure like

    myproject
    debug
    release


    When the app is started from within VC, its path is myproject.
    When you start it from the explorer, I guess, you navigate to the debug directory and start it from there.

    Maybe, that helps.

    Regards,

    Rainer

Tags for this Thread

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.