Hello:
I’m trying to use some preprocessor directives on visual studio, but it looks like visual studio is not getting them…
So I have, for example
#if TESTING == 1
void foo();
void foo(){
printf("bar");
}
#endif
int main(){
foo();
return 0;
}
Then on “Project > Properties > CUDA C/C++ > Host > Preprocessor Definitios” I specify “TESTING=1”.
I also have activated the “Use Host Preprocessor Definitions” with “Yes” value.
So, I go to “Project > Properties > CUDA C/C++ > Command Line” and I can see the “-DTESTING=1” there.
But when I try to compile, the compilation fails as “identifier foo is undefined”.
I tried to put the “-DTESTING=1” directly under “Additional options” but didn’t work either.
Does anyone knows what’s wrong? If I do the same with plain C it’s working as expected…
Thanks.