New bug in C++ binding in cl::LinkProgram.

One of function cl::linkProgram passes improper Context for clLinkProgram (exactly default Context).
Code:


inline Program linkProgram(
    VECTOR_CLASS<Program> inputPrograms,
    const char* options = NULL,
    void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
    void* data = NULL,
    cl_int* err = NULL) 
{
    cl_int err_local;    
    .....
    .....
    cl_program prog = ::clLinkProgram(
        Context::getDefault()(), <--- wrong context, should be from first input program
        0,
        NULL,
        options,
        (cl_uint)inputPrograms.size(),
        programs,
        notifyFptr,
        data,
        &err_local);

    ....
}

Can you fix it in the next release of C++ binding header?

Not sure if this is an option for you, but you could use the program::link() method from the Boost.Compute library (which provides its own low-level C++ wrapper for OpenCL) which does use the proper context when linking the program objects.