Results 1 to 2 of 2

Thread: Link to compiled library

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    2

    Link to compiled library

    In the spec with the separate compile and link steps, it implies we can build a header file and output the binary, and then load in this binary in a second program, and link our kernel (which make calls to functions in the library) to it.

    I have tried to get this working but have struggled. A simple header file is loaded as a string. I run clCreateProgramWithSource, and then
    Code :
    clCompileProgram(program, 1, &device_id, NULL, 0, NULL, NULL, NULL, NULL);
    program = clLinkProgram(context, 1, &device_id, "-enable-link-options -create-library ", 1, &program, NULL, NULL, &err);

    The binary is then grabbed with clGetProgramInfo and written to file.

    My kernel then #include <the_header_file.h>.

    How do I compile my kernel and link the library in the second program, assuming I was only given the library binary aside from my second program's source?

    Thanks,

  2. #2
    Junior Member
    Join Date
    Sep 2012
    Posts
    2

    Re: Link to compiled library

    fixed

Similar Threads

  1. what library to link against with visual studio
    By graphicsxp in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 10-25-2004, 04:47 AM
  2. How to get the OpenGL ES link-library?
    By in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 07-14-2004, 02:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •