access opencv on amd gpu with opencl
Hi, I'm starting a programming GPU (AMD Radeon HD 6770M) on Windows 7 x64 using OpenCL 1.2 and OpenCV 2.4.3. I build the library using Cmake and check the build with opencl. I select the opencl include path C:\Program Files (x86)\AMD APP\include and opencl lib path C:\Program Files (x86)\AMD APP\lib\x86
When running the OpenCV.sln using visual studio 2012 and build all file the error is
LINK : fatal error LNK1104: cannot open file '..\..\lib\Debug\opencv_ocl243d.lib'
Any one help me. I can not run opencl from opencv. Opencv run ok, but when run program for opencl, I see the error.
C++ program:
#include <iostream>
#include <stdio.h>
//OPENCV 2.4.3 WITH OPENCL AMD
#include "opencv2\core\core.hpp"
#include "opencv2\highgui\highgui.hpp"
#include "opencv2\ocl\ocl.hpp"
using namespace std;
using namespace cv;
using namespace cv::ocl;
int main(void)
{
cout << "Inicial!" << endl;
vector<cv::ocl::Info> info;
int ret = getDevice(info,2);
cout << "Ret: " << ret <<endl;
return 0;
}
Error message:
`error LNK2019: unresolved external symbol "int __cdecl cv::ocl::getDevice(class std::vector<class cv::ocl::Info,class std::allocator<class cv::ocl::Info> > &,int)" (?getDevice@ocl@cv@@YAHAAV?$vector@VInfo@ocl@cv@@V?$allocator@VInfo@`ocl@cv@@@std@@@std@@H@Z) referenced in function error LNK2019: unresolved external symbol "public: __thiscall cv::ocl::Info::~Info(void)" (??1Info@ocl@cv@@QAE@XZ) referenced in function "public: void * __thiscall cv::ocl::Info::`scalar deleting destructor'(unsigned int)" (??_GInfo@ocl@cv@@QAEPAXI@Z)
Try to build "Install" target in Visual Studio.