Date: Sat, 1 Apr 1995 08:39:32 -0500 From: dj (DJ Delorie) To: rdc AT freenet DOT vancouver DOT bc DOT ca Cc: UCKO AT vax1 DOT rockhurst DOT edu, ah230 AT leo DOT nmc DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: [?] GCC produce Portable .binaries - Was: 286, 88, 6502 Xcompile > Portable .binaries ??? > > What would the procedure be to compile a program using gcc (djgpp's) > under MSDOS (without adding go32 to it) and permit it to operate correctly > on Solarus, BSD, etc ... - Any system that used an X86 (x > 2) . There's more here than meets the eye. The SVR4 project was an attempt to do this for unix boxes, so that any SVR4 x86 could run the same binaries. > I (obviously ?) would be prepared to link in a .library for each OS I > intended to support and to test for the OS name a the start of the program. The problem is that the headers are different too, like different structure layouts and constants and such. You do have to recompile. Things like "struct stat" are OS dependent, and scattered throughout the application's code. > Would 'emulator' support be an idea ? If you emulate MS-DOS and DPMI, yes. You can already do this under Linux, OS/2, and NT.