stoltzstrop
stoltzstrop

Reputation: 67

multiple preprocessor directives to clBuildProgram

According to the specification, I should be able to pass multiple preprocessor directives using newline as the separating token. I can add one("-D x=2"), but I can't seem to figure out what magical formula will allow me to add multiple.

I've tried passing into the options parameter:

"-D x=2\ny=2\0";

"-D x=2\n-D y=2\0";

"-D x=2;\ny=2\0";

and many other variants of the same to no avail.

I'm sure this is a quick fix or I've misinterpreted the spec?

Thanks in advance

Upvotes: 1

Views: 181

Answers (1)

jprice
jprice

Reputation: 9925

Just use a regular space as a delimiter:

"-Dx=2 -Dy=2"

Upvotes: 4

Related Questions