nvcc compiler can not tell me even if an external device variable has been defined.
nvcc compiler can not tell me the error even if an external device variable has been defined.
I have the following code,
device constant extern int Adev;
global void test(void)
int B; B=Adev;
test<<<1,1>>>(); return 0;
The file can be compiled into an executable file a.exe
But in fact, as the definiton of external device variable has been defined yet, the executable file a.exe should be incorrect.
In contract, if the host side external is not defined, the compiler will tell me the error and will not generate an executable file.
extern int A;
A=1234; return 0;
Anyone can tell me why and how make the nvcc also tell me the error if I forget the definiton of an external device variable.
Thank you in advance.