Skip navigation

OpenCL library/function missing

1363 Views 15 Replies Latest reply: May 3, 2012 9:55 AM by etresoft RSS
1 2 Previous Next
studUS Level 1 Level 1 (0 points)
Currently Being Moderated
May 2, 2012 3:50 PM

I have Snow Leopard (10.6.8) and running Xcode 3.2.6 with (I hope!) version 1.1 for OpenCL. I am running a program that requires the function clEnqueueReadBufferRect() which I can see it's present in the cl.h header in my /System/Library/Frameworks/OpenCL.framework/ location. I do not understand why clEnqueueReadBuffer() is found by the compiler and clEnqueueReadBufferRect() is not, since they both belong to cl.h and I'm compiling with the "-framework OpenCL" flag. please help! any partial hint/trick is welcome

  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    May 2, 2012 4:15 PM (in response to studUS)

    Could you post the code?

  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    May 2, 2012 5:36 PM (in response to studUS)

    Try searching for 'clEnqueueReadBuffer' with Spotlight/Finder to see if you could be including it from a different header that doesn't have clEnqueueReadBufferRect.

  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    May 2, 2012 5:47 PM (in response to studUS)

    You can ignore my previous post, you have a linker error, not  a compile error.

  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    May 2, 2012 6:41 PM (in response to studUS)

    studUS wrote:

     

    ok, thanks, but how do I solve that? I need to use clEnqueueReadBufferRect and I cannot.

    That function is not present in the Snow Leopard version of OpenCL. You have to use the Lion version and Xcode4.

  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    May 3, 2012 7:09 AM (in response to studUS)

    studUS wrote:

     

    I'm not using Xcode anyway.

    Could have fooled me. I have no idea what kind of custom setup you have. Consequently, there isn't much I can do to tell you how to fix it.

  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    May 3, 2012 7:34 AM (in response to studUS)

    studUS wrote:

     

    fooled you? that was not in my intention. and I am not using any custom setup. Xcode is installed with all the developer kit, it's just I'm not using it. I rather like using g++ from a command line.

     

    That might be OK, might not.

     

    Isn't any way I could import the OpenCL 1.1 libraries (found the headers, but not the libraries) from Lion or some other place on the web and just use those instead?

     

    How did you even know that new function was there? On my Snow Leopard machine it doesn't even exist. This is a system library on Lion. If you are targeting Lion, you need to use Lion and Xcode4 to build. Plus you can use clang instead of g++. If there aren't any other Lion dependencies in OpenCL, you might be able to copy it to Snow Leopard. You could never distribute it.

     

    It just seems you are getting further and further out on the branch and are actively sawing.

  • etresoft Level 7 Level 7 (23,915 points)
    Currently Being Moderated
    May 3, 2012 8:22 AM (in response to studUS)

    Xcode isn't going to update your system libraries. Poke around in the platforms and sdk directories inside Xcode. You may be able to find a newer version of the framework. You will still have issues trying to get it running on Snow Leopard.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.