Results 1 to 4 of 4

Thread: Putting a space in path supplied to clBuildProgram()

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    13

    Putting a space in path supplied to clBuildProgram()

    Hi,

    I am trying to use #include within a kernel. And despite what I originally read on many internet pages it does work. But now I am having trouble with the locations searched for the included header files. I use the options of clBuildProgram() to pass "-I /PATH_TO_FILES/" which works for paths with no spaces, but it doesn't work for a path with a space in it.

    Does anybody know how to include spaces in this path?
    -I have tried using "" around the path (correctly escaped using \) This doesn't work, even for paths without spaces.

    Does anyone know where a relative path would use as it's basis (./) ?
    -I've already tested and it's not the directory containing the host program and kernel file.

    For what it's worth, I'm using MacOS. But obviously I'm hoping any solution is OS independent.

    Thank you,
    Dave.

  2. #2

    Re: Putting a space in path supplied to clBuildProgram()

    I've never used the -I parameter; I do << #include "/PATH_TO_FILES/headerfile.h" >> in the .cl under OSX, which might work with spaces

  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    13

    Re: Putting a space in path supplied to clBuildProgram()

    I'm feeling a little stupid for not having thought of that!

    Thank you

  4. #4

    Re: Putting a space in path supplied to clBuildProgram()

    Well, super cool! It feels good to be useful once in a while!

    For my part, I felt stupid when I found out about the -I option. It hadn't occurred to me at all; I just blindly tried putting the path in the #include statement, discovered that it worked, felt relieved, and went on to the next problem, of which there were many....

Similar Threads

  1. Replies: 0
    Last Post: 04-15-2010, 05:34 AM
  2. Dashed path issues
    By Ivo Moravec in forum OpenVG and VGU
    Replies: 3
    Last Post: 03-03-2006, 11:49 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
  •