tags:

views:

132

answers:

3

I don't know much about this stuff.

There's an app that I use on an XP netbook for tuning a car. It was working just fine. Then I needed to make a simple modification (output to STDOUT instead of to file) so I got the source from the author.

My netbook doesn't have the space for a compiler. I have Visual Studio C++ 2008 on a Windows 7 desktop. I made the adjustments, compiled and tested on the desktop and it worked perfecty. So then I copied the executable to the netbook and it won't run

"This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem".

Original (precompiled) exe works fine. To rule out my changes, I compiled the source without the mods and it still didn't work. The executable works fine on the 7 machine as well as another Win Vista machine I tried.

So its obviously something with the XP machine and the way the executable is compiled. I really have no idea how this stuff works so I don't know what to try.

Any ideas? Thanks

+4  A: 

Its because a dependency / DLL compiled into your application doesn't exist on the platform you are running on.

Open windows event viewer and view the application log. There will be an entry for the error and the name of the DLL which is missing. Copy / Install that DLL on your target platform.

I would guess your vc runtime has changed with visual studio 2008 and you need to copy the latest version to your target platform. If you dont know where to get the dependency DLL, post the name here and we can see what we can do about it.

Andrew Keith
You were absolutely correct. I didn't think it as a missing DLL because when I've run into that in the past it was always more explicit: "XXX.DLL is missing" or "required DLL is missing", etc.
Steven
+6  A: 

Couple of ideas:

As Keith said above this is DLL/manifest issue.

  1. Get Visual Studio 2008 redistributable (for matching application platform) and install it on the netbook.

  2. If this does not help: Use Dependency Walker to find out what other DLLs you are missing.

EFraim
Thank you. Dependency Walker gave me the hint that it had something to do with MFC.
Steven
+2  A: 

You can check your project settings and make sure to use a statically linked runtime instead of a DLL.

Project Settings, C/C++ -> Code Generation. Make sure you're using a runtime library that isn't a DLL. (So Multi-threaded Debug instead of Multi-threaded Debug DLL for example).

brainiac
Thanks. That did the rick. Well, almost... I couldn't select what you suggested because it then complained the AFX had to use DLL. But then I saw another option to make MFC a statically linked library instead of DLL and that did the trick!
Steven