Re: Compiling to platform independent code
- Posted by _tom (admin) Sep 07, 2018
- 1977 views
Unzipped you test program to:
c:\helloworld
Selecting a 'C' compiler was a random walk:
- turboC [required some .net files which I did not bother with]
- mingc [files were for 64bit only]
- digital mars -- no special requirements
Digital Mars unzips to c:/dm
- no installation needed
$> c:/dm/bin/dmc
gives you the compiler and a list of flags; no flag for console choice
I randomly tried the -6 flag (which is for 686 code)
From the c:/helloworld folder I type:
$> c:\dm\bin\dmc -6 helloworld.c
gives me a compiled program which runs just a bit slower than the default of no flags (or my eyes are a bit faster this morning!)
the console lasts just long enough to show that the program compiled correctly
_tom