After some investigation I found out that since VS2005 and Windows Vista you have to ship the Visual C++ Runtime library (Downloadlink see below) with your application to make them run properly.
(You'll notice the installation of the runtime files after you start nearly every game the first time in Valves Steam).
So you now have two choices...Either you ship your application with the runtime install files or you link the runtime library staticly to your application.Easy choice yeah...?
Well no. I was FORCED to find out that's it not that easy.
The tricky part is that every library you use in your application also has to be staticly linked with the runtime files.
So if you use foo.dll (DLL = Dynamic link library) and want to use it with your bar.exe but don't want the user to install the visual c++ runtime you'll have to compile foo.dll as foo.lib. To do that you have to open your DLL-project in Visual Studio and go to Project->Settings->Configurationsettings->Common. Set "Configurationtype" from "*.dll" to "*.lib" and choose "use MFC in a static library" at "Usage of MFC" after that go to "C\C++ -> Code generation" and change "Multithreaded Debug DLL" to "Multithreaded Debug" (Or "Multirthreaded DLL" to "Multithreaded" if you want to build a release).
If you've done that you do the same in your application project and then you are ready to go.
If you want to staticly link Qt library you have to do the following:
- Download the OpenSource from the QT libraries.
- After you unpacked everything start the command prompt from Visual Studio.
- Go to the root directory of the unpacked sourcecode (the same directory where bin\ is in)
- Enter "configure -static" (during this process an project.sln will get created)
- Open Visual Studio and open the just created "project.sln"
- Choose the parts of QT you want to build and xo everything mentioned above to staticly link the runtime files.
If you don't want to link staticly, here you'll get the runtime installfiles: