I'm trying to embed a file (OpenCL kernel) as char array
the main problem is that it gives me errors for any line containing #
example:
char mykernel[] =
"stuff ---"
"#if(1)"
" stuff"
"#else"
" another stuff"
"#define ASD 15";
void* clh = clsopen(cp,mykernel,CLLD_NOW);
all these things are giving me bad errors (compiler errors as if it can't see them)
Edit: semicolon was a mistake in posting question.
Errors are like:
#define ASD 15
use this ASD in the whole code, get errors like undeclared identifier
use #if #else
use some function in #if and same name in #else
get errors like the function is declared 2 times with the same name...and so on
edit2:
"#if(1)" //char number 26123: error: note: previous definition is here
" inline functionA ...with output A"
"#else" //char number 28700: error: redefinition of functionA
" inline functionA ...with output B"
\nbefore#define?