Alex Rivera | Logout

How can I make a portable executable?

Asked 2010-11-03T11:11:08.187
12

It's there a way to compile a c/c++ source file to output a .exe file that can be run on other processors on different computers ? I am asking this for windows platform. I know it can be done with java or c# , but it uses virtual machine.

PS: For those who said that it can be done just with virtual machines or the source cod must be compiled on every machine , i am asking if all viruses are written in java or c# and you need a vm machine to be infected or you need to compile source cod of worm on your machine to be infected ? (i am not trying to make a virus, but is a good example :) )

Edit
Report

1 Answer

4

The short answer is - you can't. Longer answer is write in portable (standard) C/C++ and compile on the platforms you need.

answered 2010-11-03T11:13:48.530

Your Answer