nlib
Information About the Package for Windows (Visual Studio)

Required to Use nlib

To build your package, several software programs are required, including Windows 7 (64-bit) or later, Visual Studio 2013 or later (Express Editions can be used), and CMake for Windows.

  1. Install Visual Studio 2013 or later. We recommend that you apply the latest update to the installation.
  2. Install CMake for Windows (https://cmake.org/). Run cmake using PowerShell to confirm that an appropriate path is specified.
  3. Extract the nlib package.
  4. If zlib and libcurl are required, you can compile and install them by running ./setup/setup-msvc-libraries.ps1 from PowerShell with an administrator privilege.
Directory Structure
The package for Windows (using Visual Studio) has the following directory structure.
├── lib
│   └── cmake/msvc
│       ├── nx_*-vc150amd64.lib      # static 64bit libraries for Visual Studio 2017
│       ├── nx_*-vc150amd64_d.lib    # static 64bit libraries(debug) for Visual Studio 2017
│       ├── nx_*-vc150dllamd64.dll   # 64bit DLLs for Visual Studio 2017
│       ├── nx_*-vc150dllamd64.lib   # 64bit import libraries for Visual Studio 2017
│       ├── nx_*-vc150dllamd64_d.dll # 64bit DLLs(debug) for Visual Studio 2017
│       ├── nx_*-vc150dllamd64_d.lib # 64bit import libraries(debug) for Visual Studio 2017
│       ├── nx_*-vc140.lib           # static 32bit libraries for Visual Studio 2015
│       ├── nx_*-vc140_d.lib         # static 32bit libraries(debug) for Visual Studio 2015
│       ├── nx_*-vc140amd64.lib      # static 64bit libraries for Visual Studio 2015
│       ├── nx_*-vc140amd64_d.lib    # static 64bit libraries(debug) for Visual Studio 2015
│       ├── nx_*-vc140dllamd64.dll   # 64bit DLLs for Visual Studio 2015
│       ├── nx_*-vc140dllamd64.lib   # 64bit import libraries for Visual Studio 2015
│       ├── nx_*-vc140dllamd64_d.dll # 64bit DLLs(debug) for Visual Studio 2015
│       ├── nx_*-vc140dllamd64_d.lib # 64bit import libraries(debug) for Visual Studio 2015
│       ├── nx_*-vc120.lib           # static 32bit libraries for Visual Studio 2013
│       ├── nx_*-vc120_d.lib         # static 32bit libraries(debug) for Visual Studio 2013
│       ├── nx_*-vc120amd64.lib      # static 64bit libraries for Visual Studio 2013
│       ├── nx_*-vc120amd64_d.lib    # static 64bit libraries(debug) for Visual Studio 2013
│       ├── nx_*-vc120dllamd64.dll   # 64bit DLLs for Visual Studio 2013
│       ├── nx_*-vc120dllamd64.lib   # 64bit import libraries for Visual Studio 2013
│       ├── nx_*-vc120dllamd64_d.dll # 64bit DLLs(debug) for Visual Studio 2013
│       └── nx_*-vc120dllamd64_d.lib # 64bit import libraries(debug) for Visual Studio 2013
└── samples
     └── cmake/gen-sln.ps1   # PowerShell script for starting CMake that builds the sample.
Compiling the nlib Samples
If you have installed the software programs listed above, you can now start compiling your project in Visual Studio.
  1. Move from the directory where the file was extracted to the ./samples/cmake directory.
  2. Create a Visual Studio solution file by running gen-sln.ps1 from PowerShell.
    • If you are using Visual Studio 2015 (32-bit), run gen-sln.ps1 vc140.
    • If you are using Visual Studio 2015 (64-bit), run gen-sln.ps1 vc140amd64.
    • If you are using Visual Studio 2015 (64-bit, DLL), run gen-sln.ps1 vc140dllamd64.
    • For tools other than those described above, run the appropriate shell script by passing any necessary arguments.
  3. The Debug and Release subdirectories are created under the vc140 or vc140amd64 directory (or an equivalent directory). Each of these subdirectories contains the nx_samples.sln file. Double-click this file to start the Visual Studio IDE.
    • Note that the solution (the SLN file) in the Debug directory is specifically for the Debug build, and the solution in the Release directory is specifically for the Release build.
  4. You can build all of the samples by selecting Build > Build Solution from the IDE menu.
Other Platform-Specific Information
  • For a better understanding of the flags that are set, see cmake/common.cmake.win32.