Problem with first code on visual studio 2008

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?

Did you add OpenCL to your linker input?

You have to add the lib file to the linker input files. It should be on the folders of the OpenCL SDK.

Like this :wink:

Thx for solution! :smiley:

No problem, glad to help =)