Ask Your Question
1

access opencv on amd gpu with opencl

asked 2013-01-13 05:04:30 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

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)
edit retag flag offensive close merge delete

Comments

Try to build "Install" target in Visual Studio.

Daniil Osokin gravatar imageDaniil Osokin ( 2013-01-14 03:58:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-07-25 06:18:42 -0600

decision gravatar image

Are you actually linking opencv_ocl243.lib ?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-13 05:04:30 -0600

Seen: 2,441 times

Last updated: Jul 25 '13