OpenCL Compiler Errors

I’m trying to compile my first OpenCL program on Visual Studio. Here’s the code:

#include <stdio.h>

#include <stdlib.h>

#include <CL/cl.h>

int main(int argc, char **argv){

	cl_platform_id test;

	cl_uint num;

	cl_uint ok = 1;

	clGetPlatformIDs(ok, &test, &num);

	return 0;


I’ve installed the CUDA Toolkit, and I’ve added (CUDA_INC_PATH) to my additional include directories, (CUDA_LIB_PATH) to my additional library directories, and opencl.lib to additional dependencies. When I build the program, I get this error: “error LNK2019: unresolved external symbol _clGetPlatformIDs@12 referenced in function _main.” My computer is running Windows 7 with Visual Studio 2010 and a NVS 3100M graphics card (supports OpenCL).

Any ideas what’s wrong?