Relative include paths don't work in clBuildProgram

Relative include paths don't work in clBuildProgram

I am using the 2014 beta SDK.  

I would like to pass "-I  RELATIVE\\PATH\\TO\\FILES" in as a build parameters, but this doesn't work.

I have to pass the absolute path instead. So, this forces me to hard code the build path, which is annoying

when I try building from a different location.



5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


I can't reproduce this issue (I'm using 2013 version of the SDK though, but I don't think this is important here).
I have created a kernel file with single line:
#include ""
And I'm passing relative path in build options to clBuildProgram like this for example:
And it works fine. So please double check that you're passing correct path.


Thanks, Yuri.  I should clarify: this is only a problem when targetting my AMD GPU using the Intel SDK. 

When I target the Intel CPU, I don't even need to enter an include path. 





In this case you should ask this question on AMD forum. Since when you run the application and, as you say - target AMD GPU, you're selecting AMD platform (and the device, of course), so it's AMD runtime which builds the cl program.


OK, thanks Yuri.

Leave a Comment

Please sign in to add a comment. Not a member? Join today