Results 1 to 4 of 4

Thread: include files using "I -dir" function

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    include files using "I -dir" function

    Could someone give a code example how I use it. Because it doesn't work whatever I try.

  2. #2
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    Re: include files using "I -dir" function

    I will make my question more clearer and to the point
    If I have header file,which has some functions implementations in it and should be included in several kernels(I mean these function are auxilary in all kernels and I don`t want to duplicate the code)

    How I make this inclusion - can I keep the functions in header?Will the kernels and the header functions be compiled?

    Can you specify (maybe by example) how I use the "-I" option in these case? I am using VS2010(if its matter at all)

  3. #3
    Junior Member
    Join Date
    Jul 2011
    Posts
    5

    Re: include files using "I -dir" function

    Note:each kernel runs in different program

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: include files using "I -dir" function

    You can pass "-I <path/to/includedir>" to the "options" argument to clBuildProgram(). The path has to be either absolute or relative to the application's working path.

    Alternatively, you can manually include the header file in the source code that you pass when you call clCreateProgramWithSource().
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. Replies: 1
    Last Post: 02-29-2012, 06:34 PM
  2. Load '3ds max files' with "openGL ES1.0"
    By ashok_mrec123 in forum OpenGL ES general technical discussions
    Replies: 3
    Last Post: 02-27-2006, 03:09 AM

Posting Permissions

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