A problem with executing the mnistCUDNN sample code.

Hi All.
I am trying to execute the mnistCUDNN sample code provided with cuDNN R2 in visual studio 2012 environment.
But I can’t build because of no freeImage library on windows.
Anyone have it? or any how to build it?
Thanks in advance.

Hello, cheer37.

FreeImage library can be downloaded from the following site.
http://freeimage.sourceforge.net/download.html

Thank you!

Thanks you Sora6.
I could execute the mnistCUDNN successfully by linking the FreeImage lib and dll you offered.
Best regard.

Any idea why O get this FreeImage error on Mac OS X 10.10.3

gcc -o mnistCUDNN mnistCUDNN.o -L../cudnn-6.5-osx-v2 -L/usr/local/cuda/lib  -L./FreeImage/lib/linux/x86_64 -lcudart -lnppi -lnppc -lcublas -lcudnn -lfreeimage -lm -lstdc++
ld: warning: ignoring file ./FreeImage/lib/linux/x86_64/libfreeimage.a, file was built for archive which is not the architecture being linked (x86_64): ./FreeImage/lib/linux/x86_64/libfreeimage.a
Undefined symbols for architecture x86_64:
  "_FreeImage_Allocate", referenced from:
      npp::saveImage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, npp::ImageCPU<unsigned char, 1u, npp::ImageAllocatorCPU<unsigned char, 1ul> > const&) in mnistCUDNN.o
  "_FreeImage_FIFSupportsReading", referenced from:
      npp::loadImage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, npp::ImageCPU<unsigned char, 1u, npp::ImageAllocatorCPU<unsigned char, 1ul> >&) in mnistCUDNN.o
  "_FreeImage_GetBPP", referenced from:
      npp::loadImage(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, npp::ImageCPU<unsigned char, 1u, npp::ImageAllocatorCPU<unsigned char, 1ul> >&) in mnistCUDNN.o
  "_FreeImage_GetBits", referenced from:

I don’t use Macs, but the error messages above seem to indicate that the FreeImage library was built for a 32-bit target, despite being located in an x86_64 directory. Since it was not built for a 64-bit target (x86_64), it therefore cannot be linked against the 64-bit application. As a consequence, the FreeImage functions called by the application remain as undefined symbols.

I would suggest checking the build settings for the FreeImage library.

Hi, I have the same problem on Mac OS X 10.10.4. Any idea on how to solve the problem?