Q:

Creating a real standalone application for Windows XP with MSVC 2010?

I have a C++ application only taking use of the basic Win32 API (I can remove that too if neccessary) and the C++ STL. I'm using MSVC and want it to be really standalone. I have already tried several options (including using the "Multithreaded" option instead of "Multithreaded DLL").
Yet: It misses several MSVC runtime DLLs on many computers including those in my school.

How can I create a C++ application able to run on Windows XP (and lower/higher if possible) without needing any specific DLL versions only avaiable with Service Packs and runtime-DLLs installed?

Do I have to switch to G++?
My requirements aren't that big.. Just a small executable, 35KB in size, containing some loops here and some ifs there.

A:

Well, you already found the option you need to change.  Right-click the project in the Solution Explorer window, Properties, C/C++, Code Generation, Runtime Library = /MTd.  The resulting EXE only has a dependency on kernel32.dll, Windows.
Don't forget to also do this for the Release build configuration.  Now choose /MT.

A:

If you use static linking for all libraries you use, you should not need any DLLs.  Are you sure you're not using MFC or ATL DLLs or something?  Setting the runtime library to 'multithreaded' instead of 'multithreaded DLL' should do the trick for the CRT and remove any dependency on the MSVCRT DLLs.  There should be a similar setting in general properties, like "use standard windows headers".
If you're using Visual Studio 2010, the CRT requires Windows XP SP2 or newer (so RTM or SP1 won't work).  If you need to target prior to XP SP2, you probably need to go back down to Visual Studio 2008.

