Results 1 to 2 of 2

Thread: How to Include Common File into OCL file!

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    1

    How to Include Common File into OCL file!

    Hi Everybody
    One question confused me for a long time. Some common para was set in a common file which include some struct ,macro and so on. I need to include the common file into OCL file. But using #include "common.h" or #include "common.cl" will caused function clBuildProgram return 0xffffffc5. Does anyone have the experience to include the common file into the .cl file.

    Thanks
    Alex

  2. #2
    Senior Member
    Join Date
    Jul 2009
    Location
    Northern Europe
    Posts
    311

    Re: How to Include Common File into OCL file!

    That should work fine. If it doesn't, then you should check the path to the file and make sure it is relative to the built binary. (E.g., some build systems put your program in Debug/bin or something, so you need to make sure your included file is in that directory as well.) If it doesn't work then you should file a bug against the vendor as that is supposed to be included. BTW -- if you convert your error code to a signed int you will get a nice small negative number that you can use to compare against the header file.

Similar Threads

  1. OCL programm without *.cl file
    By BratSinot in forum OpenCL
    Replies: 7
    Last Post: 09-12-2011, 08:23 AM
  2. include headers to .cl file
    By opencl_JEDI in forum OpenCL
    Replies: 1
    Last Post: 03-06-2010, 06:33 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
  •