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:


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:

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)
3) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/lib

Include Files:
2) %NVPP_INSTALL_DIRECTORY%/common/npp/include
4) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/include

Library Files:
1) %CUDA_INSTALL_DIRECTORY%lib (or lib64 for x64 platform)
3) %NVPP_INSTALL_DIRECTORY%/common/FreeImage/lib

Step 2: Specifying Additional Dependencies

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

Here’s a screenshot for reference:

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.