This release contains a file called specs. The file defines some GCC switches, if you use the new GCC options -Zwin32 and -Zrsx32. To use C runtime DLLs you should use the option Zcrtdll=crtrsxnt
Type of executables:
It is really easy to modify makefiles for emx tools to create Win32 applications. For the most GNU tools you must only redefine the “CC” macro.
$(CC) = gcc -Zwin32
or
$(CC) = gcc -Zrsx32
| -Zwin32 | Creates Win32 executable |
| -Zrsx32 | Creates bound executable (Win32 console / 32-bit DOS) |
| -Zsys | Use system library instead rsxnt.dll |
| -Zmt | Creates a multithreaded application |
| -Zdll | Creates a Dynamic Link Library (DLL) |
| -Zno-rte | Executable without C-runtime |
| -Zdll-so | Stand-alone DLL |
| -Zcrtdll=crtrsxnt | Uses the dynamic C runtime DLL |
| -mprobe | Enables stack probes to commit the stack |
| -m486 | Align for 486 CPU and higher |
| -Wall | Enables all warnings |
| -c | compile only, does not link |
| -g | Includes symbolic debugging information (GDB) |
| -s | Strips symbols from executable |
| -O | Enables optimizer |
| -pipe | Use pipes rather than temporary files for communication between the various stages of compilation. |
| -v | Prints compile commands |
Pre-processor:
The option -Zwin32 defines the symbol __WIN32__ and __RSXNT__.
The option -Zrsx32 defines the symbol __RSX32__ and __RSXNT__.
The option -Zcrtrsxnt=crtrsxnt defines the symbol __CRTRSXNT__.
The option -Zdll defines the symbol __DLL__
Compiler:
The new options set the cc1 option -mprobe to enable stack probes.
Linker:
The options -Zwin32 and -Zrsx32 links the program at the Win32 image base address 0x400000. Some emx C-library functions are replaced with the libraries win32crt.a, win32dll.a, wthreads.a, c_dllnrt.a and winmain.a.
The option -Zwin32 also links the libraries kernel32.a, user32.a and gdi32.a to the program.
Zcrtdll=rsxntcs will link the C runtime library to the application.
Ntbind:
-Zwin32 -s (Win32 release):
Ntbind uses a short DOS stub, that prints: 'This Win32 program cannot run under DOS'.
-Zwin32 (Win32 debug):
Ntbind uses a emx compatible DOS stub, that allows to use GDB. Unfortunately, RSX can run this program.
-Zrsx32 (bound mode):
Ntbind uses the DOS stub 'dosstub.rsx' that contains a valid emx header. RSX and RSXWIN also can run this program.
Possible applications and supported environments:
| GCC | TXTADDR | COMMENT | NT | 95 | 32S | RSX | -WIN | EMX | OS2 |
| -Zwin32 | 0x410000 | Win32 GUI, Console | x | x | x | - | - | - | - |
| -Zrsx32 | 0x410000 | text-applications | x | x | (x)1 | x | x | - | - |
| - | 0x10000 | text-applications | - | - | - | x | x | x | x |
| - | 0x10000 | PM OS/2 app | - | - | - | - | - | - | x |
Notes:
1: Inside RSXIDE program
| Column | Description |
| NT | WinNT 3.5x |
| 95 | Win95 |
| 32S | Win3.1 + Win32s 1.30 |
| RSX | DOS-box or DOS with DPMI and rsx extender |
| -WIN | Win 3.1/95 and rsxwin extender |
| EMX | DOS and emx extender |
| OS2 | OS/2 2.x / 3.x |