Because the universe is beautiful enough without having to lie about it

C++ Release Advice

March 22nd, 2009 Posted in General

This is a short post that will mean nothing to almost all readers, but I need to say it as it took me so long to find a solution. This way, there’s a solution out there that people will be able to find if they come across the same issue.

If you write a C++ app using MSVC++ Express Edition, and compile it for distribution to other machines, you might get the following error when you try to run it on a machine other than the one it was compiled on:

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

Essentially, the code was compiled in such a way that it expects to be able to find the runtime libraries it needs somewhere on any computer on which it runs. Which is probably not what you want – as most computers won’t have the correct libraries available, by default. Hence the error.

I found the solution eventually, which was actually really easy. Simply go to Project-> Properties -> Configuration Properties -> C/C++ -> Code Generation and change from a DLL based Runtime Library to a non-DLL one. I used “Multi-Threaded”. Then recompile, and you’re done. The executable is a bit larger – presumably because it bundles everything in the one file, but at least it works. 🙂

Be Sociable, Share!

Post a Comment

To protect against spammers, please enter the letters you see below

Please don’t bother posting "you’re wrong, you jerk" comments, unless you can back them up with valid scientific research papers.