Which programming languages that can generate self contained windows .exes?
For Windows the following languages are viable:
- C (MS, gcc)
- C++ (MS, g++, Digital Mars)
- D (Digital Mars)
- Delphi (Embarcadero??? how do you spell that? just trips off the tongue doesn't it?)
- Fortran (Intel, Salford Software)
- Visual Basic 6 (MS)
- Lua (you'll need a special tool to do it, but it is doable)
- C#, VB.Net, F#, J#, etc (assuming that you don't mind using .Net technology)
You can certainly do this with C/C++. Technically the runtime libraries are required, but they should already be installed on any windows, mac or linux system.
With .NET you can compile to an EXE, but of course the .NET framework is required. For newer versions of windows it should be installed by default, but on older versions (XP or older?) it may or may not be there. And of course you couldn't expect mono to be there by default on linux or mac either.
Delphi compiles to one executable, and generates native windows executables. So no dependencies to any kind of framework. If you use Free Pascal (fpc) and the Lazarus IDE, you could even develop for Linux and Apple from the same source.
If your using external dll's this would become a bit more tricky, but you could pack them up in your resource file and still maintain the one exe property.
Update 2020: since @Vassilis & @Marco van der Voort commented on this, I would like to update my old andswer and add that go is a very good way to make self-contained executables. Even crossplatform compilation is realy simple.