AnsweredAssumed Answered

unresolved external symbol clIcdGetPlatformIDsKHR...

Question asked by settle on May 18, 2012
Latest reply on Jul 5, 2012 by settle

I'm trying to experiment using clIcdGetPlatformIDsKHR, but I can't even seem to get my first test code to compile.  I'm using the Visual Studio 2010 with the AMD APP SDK 2.6 and Catalyst 12.4--installed after the SDK.  I've added $(AMDAPPSDKROOT)include and $(AMDAPPSDKROOT)lib\x86_64 (for x64) to the include and library directories, respectively, and added the OpenCL.lib to the linked libraries.  Here's the short source code

#pragma OPENCL EXTENSION cl_khr_icd : enable


#if defined(__APPLE__) || defined(__MACOSX)

#include <OpenCL/opencl.h>


#include <CL/opencl.h>



int main(int argc, char *argv[])


    cl_int status = CL_SUCCESS;


    cl_uint num_platforms = 0;

    cl_platform_id *platforms = NULL;


    status |= clIcdGetPlatformIDsKHR(num_platforms, platforms, &num_platforms);

    platforms = new cl_platform_id[num_platforms];

    status |= clIcdGetPlatformIDsKHR(num_platforms, platforms, &num_platforms);


    delete [] platforms;


    return status;



and error

error LNK2019: unresolved external symbol clIcdGetPlatformIDsKHR referenced in function main


Could anyone guess as to what's causing this error and how I could fix it?  Thanks!