View Full Version : Problem with first code on visual studio 2008

04-13-2010, 03:56 PM
Hi all!
I have installed ATI Stream SDK 2.1 with Visual Studio 2008 Professional
and I try a simple code for start:

#include <stdio.h>
#include <stdlib.h>
#include <cl.h>
int main()

cl_platform_id platform;
clGetPlatformIDs( 1, &platform, NULL );

VS2008 makes those errors:

Errore 1 error LNK2019: riferimento al simbolo esterno _clGetPlatformIDs@12 non risolto nella funzione _main aes_ctr.obj Aes_ctr
Errore 2 fatal error LNK1120: 1 esterni non risolti C:\Users\Davide\Documents\ATI Stream\samples\opencl\Release\Aes_ctr.exe Aes_ctr

Can anyone suggest me any solution?

04-14-2010, 02:18 AM
Did you add OpenCL to your linker input?

04-14-2010, 06:51 AM
You have to add the lib file to the linker input files. It should be on the folders of the OpenCL SDK.

Like this http://img197.imageshack.us/gal.php?g=link1i.png ;)

04-15-2010, 02:01 PM
Thx for solution! :D

04-15-2010, 02:12 PM
No problem, glad to help =)