How to Configure Visual Studio 2005/2008 for Using CUVILib (32bit/64bit)

CUVILib version 0.3 has been released with a nice set of some core Image Processing and Computer Vision algorithms acclerated on GPUs using NVIDIA CUDA. For those who are not familiar with CUDA or GPU Programming, I would suggest you head on right to NVIDIA CUDA Page. The rest may continue.

So here’s what you will need to use CUVILib to accelerate your applications:

Pre-Requisites:

Step 1: Setting up Environment Variables

Check through the following list and make sure you do not have any of these environment variables missing from your Visual Studio paths.

How to set environment variables in Visual Studio:

Simply go to Tools –> Options –> Projects and Solutions –> VC++ Directories

Here’s the screenshot:
image

Now select your Platform from the dropdown menu (Win32 or x64) and then check whether you have the following paths added:

Executable Files:
1) %CUDA_INSTALL_DIRECTORY%bin (or bin64 for x64 platform)
2) %NVPP_INSTALL_DIRECTORY%/common/lib
3) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/lib
4) %CUVI_INSTALL_DIRECTORY%bin

Include Files:
1) %CUDA_INSTALL_DIRECTORY%include
2) %NVPP_INSTALL_DIRECTORY%/common/npp/include
3) %NVPP_INSTALL_DIRECTORY%/common/UtilNPP
4) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/include
5) %CUVI_INSTALL_DIRECTORY%include

Library Files:
1) %CUDA_INSTALL_DIRECTORY%lib (or lib64 for x64 platform)
2) %NVPP_INSTALL_DIRECTORY%/common/lib
3) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/lib
4) %CUVI_INSTALL_DIRECTORY%lib
5) %NVIDIA_GPU_Computing_SDK_INSTALL_DIRECTORY/C/common/lib

Step 2: Specifying Additional Dependencies

Go to Project –> Project Properties –> Linker –> Input –> Additional Dependencies

Here’s a screenshot for reference:
image

Now enter the following Additional Dependencies library files:

Platform: Win32
1) cutil32.lib (For Configuration=Debug: cutil32D.lib)
2) cudart.lib
3) FreeImage.lib (Optional. Add it if you plan to use the FreeImage library for Image I/O)
4) libnpp-mt.lib
5) cuvi32.lib For Configuration=Debug: cuvi32D.lib)

Platform: x64
1) cutil64.lib (For Configuration=Debug: cutil64D.lib)
2) cudart.lib
3) FreeImage64.lib (Optional. Add it if you plan to use the FreeImage library for Image I/O)
4) libnpp-mt-x64.lib
5) cuvi64.lib (For Configuration=Debug: cuvi64D.lib)

That’s it! You are all ready to go. Now you may use CUVILib with NVPP or as a separate library.

Let me know if you are facing any issues with setting up the project configuration. You can also post your issues on CUVILib forums that would guarantee a prompt reply from one of our dev team member.