locked
This application has failed to start because the application configuration is incorrect RRS feed

  • Question

  • Hi everyone,

    I'm posting about a problem that has been addressed in the past, but the pure wealth of options and acronyms posted confused me. I'm a new Masters student, and I'm used to developing all my projects under a Linux environment. As such, I'm very new to developing applications using VS. I'm using Visual Studio 2005 (not Express) and developing in C++. I'm developing an OpenGL program, and the template I used to set it up uses Managed C++.

    All I want to do is develop an application executable that can be run on machines that don't have VS2005 installed. I don't want to force my supervisors to install VS2005 to simply run my various applications.

    I've built a debug version, found the executable in the program directory, and it runs fine on my machine (and on other machines with VS2005 installed). When I move it to machines (WinXP SP2) that don't have VS2005 installed, I get the "classic" error message in the subject.

    The other options I've seen in threads are either geared towards C++ Express, or they involve some type of installer (which I don't want to have to get my supervisor to run if at all possible).

    If someone could provide some help targeted specifically for my situation, I would be very grateful. If you need more information posted about project settings, please clarify and I will post more information (though, keep in mind I'm not too familiar with the whole VS environment yet, so please be very clear about what information you need).

    Thanks a lot to anyone who can help me!
    Sunday, November 26, 2006 12:11 AM

Answers

  • looks like there is something in the manifest file that cannot be found. The manifest lists the dlls that are required to run an applicaiton.

    You need to use static linked libraries, not dynamic linked libraries and the problem should disappear.

    Sunday, November 26, 2006 1:58 AM
  • I can understand that you are in a hurry and don't have time to learn everything; I have been there many times too.

    The easiest solution might be to do a static build; that is, the executable can be built to have everything it needs. This might be the most convenient solution if your application is just one executable file (exe). The main disadvantage is that the executable is much larger than it would if it uses DLLs. The other disadvantage is that the program must be rebuilt if software it uses changes.

    If that is not convenient, then you essentially must use a setup program of some type. You might think you can simply copy DLLs, but that can easily go wrong. Depending on what your program requires, it might be possible to use a special generalized setup program that installs run-time DLLs that are needed by VC. I don't know where that program is so I won't try to find it in case the static build works.

    You can change your project so that it does a static build by changing the option in the project settings.

    Monday, November 27, 2006 6:01 AM
  • It looks like you are developing a managed application (using /CLR). For CLR application, only dynamic linking to the CRT is allowed.

    Thanks,
    Ayman Shoukry
    VC++ Team
    Friday, December 1, 2006 4:09 PM

All replies

  • looks like there is something in the manifest file that cannot be found. The manifest lists the dlls that are required to run an applicaiton.

    You need to use static linked libraries, not dynamic linked libraries and the problem should disappear.

    Sunday, November 26, 2006 1:58 AM
  • I can understand that you are in a hurry and don't have time to learn everything; I have been there many times too.

    The easiest solution might be to do a static build; that is, the executable can be built to have everything it needs. This might be the most convenient solution if your application is just one executable file (exe). The main disadvantage is that the executable is much larger than it would if it uses DLLs. The other disadvantage is that the program must be rebuilt if software it uses changes.

    If that is not convenient, then you essentially must use a setup program of some type. You might think you can simply copy DLLs, but that can easily go wrong. Depending on what your program requires, it might be possible to use a special generalized setup program that installs run-time DLLs that are needed by VC. I don't know where that program is so I won't try to find it in case the static build works.

    You can change your project so that it does a static build by changing the option in the project settings.

    Monday, November 27, 2006 6:01 AM
  • Thanks for your help...

    Can someone point out to me exactly where I can find the option to have it statically linked? I've looked, and all I can seem to find is (under Project -> Properties -> C++ -> Code Generation) "Runtime Library", which is set to /MDd right now. So I try setting it to /MTd or /MT (I want the debug release), and I get "cannot compile due to incompatible types: /clr", which is Common Language Runtime Support under "General" in Properties. So, I check that off (make it have no support), and then I get a bunch of nonsense compile errors that didn't surface under the old system (missing semicolons, etc).

    The static linking solution makes sense, and indeed, I had tried this option before posting my thread here. I just couldn't get a static compile to work. Can anyone provide some more clear instructions as to exactly what I should be changing in the project properties?

    I really hope I'm missing something simple. Thanks a lot, and sorry if this seems like a somewhat rudimentary or trivial question. I just have to get on with my research and this has caused me enough trouble as it is. Thanks again.

    (By the way, I don't care about executable size or the need to recompile, etc. Right now, I just want a working version on non-VS2005 machines.)
    Tuesday, November 28, 2006 4:13 AM
  • It looks like you are developing a managed application (using /CLR). For CLR application, only dynamic linking to the CRT is allowed.

    Thanks,
    Ayman Shoukry
    VC++ Team
    Friday, December 1, 2006 4:09 PM
  • I have exactly the same problem. However I am not building a managed application (/CLR). I could try to build it with static libraries but I don't want my application to become redundant in a few years when libraries change or whatever. Anyhow, I also can't see how to set the compiler to use static libraries in the project's Property Pages.

    What's the simplest option for automating the installation of a new application in a way that ensures all the required dll files are in place on any windows machine? Or can the user at least use the manifest list to make sure the libraries exist?

    My application is a small console application (the .exe is 17k) that I created in Visual C++ 2005 Express. I want to share it with 10-20 users working on XP platforms. It processes data using file i/o, thats all. So I don't need a top-heavy install process, ideally I just wanted to share the executable.

    Bill.

    PS: I figured out using Dependency Walker (www.dependencywalker.com) that my application requires the following:

    KERNEL32.DLL
    MSVCP80.DLL
    MSVCR80.DLL
    MSVCRT.DLL
    NTDLL.DLL

    Wednesday, January 31, 2007 10:33 PM
  •  Bill Tubbs wrote:
    I have exactly the same problem. However I am not building a managed application (/CLR).
    I think your situation is different. It is likely to have a different solution. Therefore it should be a different thread.
    Wednesday, January 31, 2007 11:03 PM
  • OK, I started a completely new thread here:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1175307&SiteID=1&mode=1

    Please post replies to this.

    Wednesday, January 31, 2007 11:14 PM