what sir(shabbir) had told is correct we can run executable files in other pc's without c compiler I have done it
But some do not work.I created a graphics program in C++ and it doesn't work in another PC which doesn't have C++ installed
C or C++ program - that's immaterial! Did you create (compile) your program in Windows - if so, the program may be dependent on DLLs. If the DLLs are missing in the target system (the computer on which you are trying to run the EXE) OR the DLLs are not in the path your program will not execute. It may also be that DLL is present in the target system but may be a lower version and does not have the function that is called in your program. There is a program called 'pedump' which is available with the source (which is rather advanced) and the compiled EXE (pedump.exe) as a free download from: http://www.wheaty.net/downloads.htm (look for tag Updated Pedump) Just run pedump with your EXE as command line argument (I am assuming it is compiled with some windows compiler like Vc++ or BorlandC++ or gcc for windows) in the console window: pedump <mygraphicprogram.exe> It will list many things - look for the heading Imports Table - all the DLLs your program needs will be listed! Hope this helps!!
if we have an compiler and an editor ie (IDE) then we can compile and execute the program and a EXE file will be created and if we copy tat exe file and run on the other systems then it might work provided if we have an TURBO c compiler..just try it
To my knowledge Turbo C is meant ONLY for MS-DOS (I dont think a Windows version is available - you have Borland C++ for windows). The Turbo C libraries are all static libraries. When your program invokes a function like printf() the full binary code for printf() is copied from the static library and included with your EXE - therefore you dont need Turbo C on the target system to run your EXE. Only the processor and OS of the target system should be compatible. On the other hand even basic Windows functions like MessageBox() ,CreateWindow() which are invoked in your windows programs are not included with your EXE - only the references to these functions and the DLLs which contain these functions are included in your EXE header in the 'Imports Table' which I have mentioned in an earlier thread.