Im trying to install the opencv libraries and i tried following the instructions at:
http://blog.cuvilib.com/2011/03/22/how-to-build-opencv-2-2-with-gpu-cuda-on-windows-7/
but Im having problems getting the sample code to compile. When I try:
#include <iostream>
#include <opencv2/opencv.hpp>
#include <opencv2/gpu/gpu.hpp>
using namespace std;
int main()
{
try
{
cout<<cv::gpu::getDeviceName(0);
}
catch(const cv::Exception& ex)
{
std::cout << "Error: " << ex.what() << endl;
}
return 0;
}
I get these errors
1>test.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl cv::gpu::getDeviceName(int)" (?getDeviceName@gpu@cv@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function _main
1>C:\Users\Chris\Documents\Visual Studio 2008\Projects\open cv image capture\Debug\open cv image capture.exe : fatal error LNK1120: 1 unresolved externals
How can I fix them?