You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Building NSPR 2.0 on Windows NT and Windows 95

This document explains how to build the Netscape Portable Runtime (NSPR) module. NSPR 2.0 can be built on Windows NT 3.51, Windows NT 4.0, or Windows 95.

1. Install the compiler

    Visual C++ 4.2 or later.

2. Install the following tools: gmake.exe, shmsdos.exe, and uname.exe

    These tools are available as part of the mozilla.org distribution as executable binaries (precompiled for either I386 or Alpha) or as sources. The latest gmake and bash from the from Free Software Foundation are possible substitutes, though they will not perform as well.

3. Check out the source code

    Check out the source code
      cvs co ns/nspr20

4. Build it

    Now you can build nspr20.
      cd ns\nspr20
      gmake export
       
    Note: To build for the WIN95 target on an NT machine, you can set the environment variable OS_TARGET to WIN95. For example, in a DOS Prompt, you say:
       
        set OS_TARGET=WIN95
       
    Then you can do gmake export as usual. Alternatively, you can define the OS_TARGET variable on the gmake command line:
       
        gmake export OS_TARGET=WIN95
       
    The first time you do gmake export, ns\dist will be created. Assuming you are running Windows NT 4.0, header files are copied to ns\dist\WINNT4.0_DBG.OBJ\include and the libraries, libnspr20.lib, libnspr20.dll, etc., are copied to ns\dist\WINNT4.0_DBG.OBJ\lib. You need to add the ns\dist\WINNT4.0_DBG.OBJ\lib directory (use an absolute full pathname) to your Path variable so that the DLLs like libnspr20.dll can be found.

    Note: on NT-Alpha, the name of the object directory would be WINNT4.0ALPHA_DBG.OBJ.

5. Build and run the test programs
    We have some test programs in the directory ns\nspr20\pr\tests. Assuming you are running Windows NT 4.0, the binary executables are created in the WINNT4.0_DBG.OBJ subdirectory. To run the test program cvar, for example, you say

    cd ns\nspr20\pr\tests\WINNT4.0_DBG.OBJ
    cvar

       
    Note: Remember to add the ns\dist\WINNT4.0_DBG.OBJ\lib directory to your Path variable before you run the test programs.
 

Last updated: Tue Mar 10 13:41:33 PST 1998

Copyright © 1998 Netscape Communications Corporation