PDA

View Full Version : Application works when started from VS2005, breaks when started from explorer



giacomo
16th September 2008, 07:50
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.

aamer4yu
16th September 2008, 08:34
are ur visual c++ libraries path properly set in environment variables ??

giacomo
16th September 2008, 08:43
%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

Methedrine
16th September 2008, 19:11
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 (http://www.dependencywalker.com).

giacomo
19th September 2008, 09:46
Are you launching the program on the same machine?

Yes I am.


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)

RThaden
19th September 2008, 15:24
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