Trouble building VisionWorks on Windows

We are attempting to install VisionWorks on Windows as described in the link named “VisionWorks 1.0 for Windows README” on this page: Vision Programming Interface (VPI) | NVIDIA Developer

Our problem is:
We are unable to build the files.

According to the README document, VisionWorks is compatible with Windows with the following configuration:
OS : Windows 8 x64
OpenCV : public OpenCV 2.4.12
CUDA : NVIDIA CUDA 7.0

We are using exactly this same configuration with the following variables as described in the README (with our specific PC’s paths, which we have set these as environment variables with the following values):
[CUDA_VERSION] : 7.0
[CUDA_INSTALL_DIR] : C:\cuda\v7
[OpenCV_INSTALL_DIR] : C:\opencv
[OpenCV_VERSION] : 2412
[VisionWorks_VERSION] : 1.0
[VisionWorks_INSTALL_DIR] : C:\cuda\VisionWorks
[SAMPLES_BUILD_DIR] : C:\cuda\VisionWorks\SAMPLES_BUILD_DIR

We are using Visual Studio 2013 Professional 64-bit.

We have followed the directions in the README as described below and as seen in the images at end of post:

Step 1:
Copy samples from [VisionWorks_INSTALL_DIR]\share\visionworks\sources to a directory with write access [SAMPLES_BUILD_DIR].

Step 2:
Open Visual Studio’s Developer Command Prompt - VS2013 x64 Native Tools
Command Prompt.

Step 3:
Go to the [SAMPLES_BUILD_DIR]:

> cd [SAMPLES_BUILD_DIR]

Step 4:
Edit the config.nmake file to insert correct paths for all prerequisite installation directory information.

# Dependency locations
CUDA_DIR = [CUDA_INSTALL_DIR]
OPENCV_DIR = [OpenCV_INSTALL_DIR]\build
OpenCV_VERSION = [OpenCV_VERSION]
VISIONWORKS_DIR = [VisionWorks_INSTALL_DIR]

# Debug build?
dbg = 0

Step 5:
Build samples using nmake

> nmake

But when we execute the nmake command we get the following error:

C:\cuda\VisionWorks\SAMPLES_BUILD_DIR> nmake

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1 Copyright (C) Microsoft Corporation. All rights reserved.

cd nvxio && “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\ amd64\nmake.exe” / /nologo build if NOT EXIST “obj\release” mkdir “obj\release” cl /EHsc /O2 /MD /nologo “-DVISIONWORKS_DIR="C:/cuda/VisionWorks"” -D USE_GUI=1 -DUSE_GLFW=1 -I./include -I./shaders -I…/3rdparty/opengl -I…/3rdpa rty/freetype/include -I…/3rdparty/glfw3/include -I./src -DUSE_OPENCV=1 -I “C:\c uda\v7\include” -I “C:\opencv\include” -I “C:\cuda\VisionWorks\include” -I “…\3 rdparty\eigen” /Fo"obj\release" /c src\Application.cpp src\ArgumentParser.cpp src\ConfigParser.cpp src\OptionHandler.cpp src\Utility.cpp Application.cpp c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio<b>OptionHandler.hpp(109) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce template argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(118) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(127) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(136) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ ArgumentParser.cpp c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(109) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(118) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(127) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(136) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ ConfigParser.cpp ./include\NVXIO/OptionHandler.hpp(109) : error C2783: ‘nvxio::Range nvxio::ra nges::all(void)’ : could not deduce template argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ ./include\NVXIO/OptionHandler.hpp(118) : error C2783: ‘nvxio::Range nvxio::ra nges::all(void)’ : could not deduce template argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ ./include\NVXIO/OptionHandler.hpp(127) : error C2783: ‘nvxio::Range nvxio::ra nges::all(void)’ : could not deduce template argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ ./include\NVXIO/OptionHandler.hpp(136) : error C2783: ‘nvxio::Range nvxio::ra nges::all(void)’ : could not deduce template argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ OptionHandler.cpp c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(109) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(118) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(127) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\OptionHandler.hpp(136) : error C2783: ‘nvxio::Range nvxio::ranges::all(void)’ : could not deduce te mplate argument for ‘T’ c:\cuda\visionworks\samples_build_dir\nvxio\include\nvxio\Range.hpp(163) : see declaration of ‘nvxio::ranges::all’ Utility.cpp Generating Code… NMAKE : fatal error U1077: ‘“C:\Program Files (x86)\Microsoft Visual Studio 12.0 \VC\BIN\amd64\cl.EXE”’ : return code ‘0x2’ Stop. NMAKE : fatal error U1077: ‘cd’ : return code ‘0x2’ Stop.

Here are a set of images showing the steps described above:

Update: (still experiencing the same error message)

After looking closer into the first error seen above, we opened the file “OptionHandler.hpp” to investigate it.

We noticed the following comment:

/* The roundabout way of specifying the second parameter's type is due to an apparent bug in VC++ 2013.
       If specified directly as std::initializer_list<std::pair<std::string, T>>, VC++ insists on deducing
       T from the second argument, and fails. Indirecting it through a metafunction like this is enough to
       persuade it to deduce T from the first argument instead. */
    template <typename T>
    static ptr oneOf(T *result, typename PairList<T>::type allowedValues);

We tried to modify this code and tried to comment it out.

We also have inspected the fatal error U1077 and return code ‘0x2’.
We have read that this return code may be related to us not properly setting the environment variables. So we explicitly set the following values in the corresponding environment variables:

Variable :Value
CUDA_VERSION : 7.0
CUDA_INSTALL_DIR : C:\cuda\v7
OpenCV_INSTALL_DIR : C:\opencv
OpenCV_VERSION : 2412
VisionWorks_VERSION : 1.0
VisionWorks_INSTALL_DIR : C:\cuda\VisionWorks
SAMPLES_BUILD_DIR : C:\cuda\VisionWorks\SAMPLES_BUILD_DIR

We also added the following to our systems “path” environment variable:
C:\cuda\v7\bin
C:\opencv\build\x64\vc12\bin
C:\NVIDIA_VisionWorks\bin

And to ensure that OpenCV and CUDA installed properly we tested out a Visual Studio project using the imread function from the OpenCV library which passed the data into a custom CUDA kernel.
The following macros are imported in visual studio by default:
Name Value
$(CUDA_PATH) C:\cuda\v7
$(CUDA_INSTALL_DIR) C:\cuda\v7
$(CUDA_VERSION) 7.0
$(VisionWorks_VERSION) 1.0
$(OpenCV_INSTALL_DIR) C:\opencv
$(OpenCV_VERSION) 2412

The following properties were explicitly set for OpenCV by us in Visual Studio:
Configuration Properties → C/C++ → General → Additional Include Directories:
C:\opencv\build\x64

Configuration Properties → Linker → General → Additional Library Directories:
C:\opencv\build\x64\vc12\lib

Configuration Properties → Linker → Input → Additional Dependencies:
opencv_core2412d.lib

We also found this related question/answer on stack exchange:
http://stackoverflow.com/questions/23831911/nmake-fatal-error-u1077-cd-return-code-0x2-cl-exe?answertab=active#tab-top

We ensured the file OptionHandler.hpp does not have any empty strings.

We still are experiencing the same issue.

Any help will be extremely appreciated.