Current Page: NeXtMidas User's Guide Installation and Customization Compile Native Code on Windows
2. - | ## Compile Native Code on Windows Platforms The NeXtMidas is distributed with pre-compiled versions of the C/C++ libraries used in the `SYS` option tree for the Windows platform. These files are provided in the `$NMROOT/os/dos/dlls` directory. By default, the NeXtMidas uses these pre-compiled files for DOS platforms. To override these files, you can obtain a copy of the GNU C Compiler (`gcc`) and compile native code on your machine. This section contains information for installing and using these C compilers (both of which are free): Select which C compiler to install. Either of the following compilers will work: Cygnus Solutions (Used by GNU) Covered by the GNU software license, the Cygwin software is free and has a useful FAQ link. EGCS (Experimental GNU) EGCS is an older version of the `gcc` which is no longer supported. Current GNU documentation recommends that Windows platforms use Cygwin. Install a GCC compiler on your local machine. Use the appropriate installation instructions for that specific compiler: Cygnus Solutions C/C++ Compiler. The GCC compiler is available from Cygnus Solutions at www.cygwin.com. Note 1: The Cygwin software provides unix commands for a Windows machine, as well as other tools (gnu compiler, CVS, etc.). Therefore, if you choose all the tools, the Cygwin download could be very large. If you opt for the default installation, you must explicitly add `gcc` to the list of packages to be downloaded. If you want to download the minimum Cygwin components required to run `gcc`, then select these packages:
         ash   bash   binutils   cygwin   fileutils

                 gcc   make   mingw      w32api
     To download and install the desired packages, follow the Cygwin installation instructions. Install Cygwin at `C:\cygwin` Note 2: To use the Cygwin GCC compiler, you must update your Windows `PATH` environment variable to include `c:\cygwin\bin` in the search path so `gcc` can find all its required files. (Typically, an Administrator does this.) After installing `gcc`, verify that you can invoke it from the command line:
         c:\> gcc -v
   - This should report the compiler version to you. The EGCS C/C++ Compiler Install the EGCS compiler at `C:\egcs`. After installing the `gcc`, verify that you can invoke it from the command line:
         C:\> c:\egcs\bin\gcc -v
3. This should report the compiler version. Edit `%NMROOT%/nxm/sys/cfg/build.props` Use Notepad to edit the file changing the following lines from:
       native.win.compiler   = none
       native.win.cflags     =
       native.win.lflags     =
   - to: Cygwin
         native.win.compiler   = c:\\cygwin\\bin\\gcc.exe
         native.win.cflags     = -mno-cygwin
         native.win.lflags     = -shared \
                                 -Wl,--add-stdcall-alias \
                                 -mno-cygwin
   - ECGS
         native.win.compiler   = c:\\egcs\\bin\\gcc.exe
         native.win.cflags     =
         native.win.lflags     = -shared \
                                 -Wl,--add-stdcall-alias
4. Delete existing compiled code. Before using `gcc` to create native DLLs and executables, delete any pre-compiled code:
       c:\> nm make clean all
5. Re-run `nmstart` and compile. Run `nmstart` so that it reads the new compiler settings and then compile NeXtMidas:
       c:\> %nmstart%
       c:\> nmmake all
Note: Full support for building XBC with GCC with DEC Fortran extensions was added 3.9.4.