Skip to main content

more options


Porting from UNIX to Windows

If you choose to modify Unix makefiles to work with Microsoft's Nmake, the following hints may be helpful. Note that the latest version of Nmake seems to be rather tolerant of Unix conventions in paths and filenames.

  • Some utility functions have different names.
  • Slashes in paths may need to be tipped in the opposite direction.
  • Suffixes may need to be changed as follows:
    UNIX Windows
    Library .a .lib
    Object file .o .obj
    Executable file (none) .exe
    C++ source file .C .cpp
    Input to Fortran Preprocessor .F .fpp

For more information, see Unix-like interface and Building Large Projects.

If you choose to modify Unix makefiles to work with Microsoft's Nmake, the following hints may be helpful. Note that the latest version of Nmake seems to be rather tolerant of Unix conventions in paths and filenames.

  • Some utility functions have different names. For example, libraries are created by ar in Unix and by lib in Windows. Also, ar appends to a library by default but lib does not, so if you want to add a function to a library, be sure to specify both the library and the new function as inputs to lib
  • Slashes in paths may need to be tipped in the opposite direction.
  • Suffixes may need to be changed as follows:
    UNIX Windows
    Library .a .lib
    Object file .o .obj
    Executable file (none) .exe
    C++ source file .C .cpp
    Input to Fortran Preprocessor .F .fpp

For more information, see Unix-like interface and Building Large Projects.