how to make exe in linux?

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
how do i make my .out file in linux into an .exe that can be run on any system? i made a calculator in c++ and assembler for a class(all the math is done in assembler), and i'd like to know if i could compile it to an executable file so i could simply run it on a windows machine for demonstration. (otherwise i'd have to do it from a console remotely)
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
yeah except this is coded in a .cc file and the only windows compiler i have it ms c++. i'd have to change a bunch of the code to make it compatible. the teacher wants us to be coding it in linux, so i cant really change it to ms syntax.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
if you want it to run on any system, you'll need to code it in java or have an x86 emulator on the other platform.
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
well i dont really mean any other platform. i mostly mean for it to be in windows and linux. already works in linux, now i want to make it work in winblows
 

andri

Senior member
Aug 12, 2000
339
0
0
Get DJGPP or Cygnus's GCC port. The same good ol' gcc, but runs on Win*...
 

Jaraxal

Senior member
Oct 9, 1999
383
0
0
I was under the impression that if you coded using ANSI standards, the code would be portable.

Unless you use something specific to a particular architecure, api or OS, you should be able to compile it under windows.

I could be wrong though ...
 

nuttervm

Golden Member
Nov 13, 1999
1,818
0
0
maybe i need a new windows compiler? minor things like in g++ in linux i declare aan asm statement asm(" ") with teh code inside. with msc++ 6 it needs to be __asm (" ") small differences, but i want the code to work on all x86 machines.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
write a program that converts the source between the two syntaxes needed by the compilers.