Tmpxft_..._main.cudafe1.cpp:undefined reference to "mandelbrot_count" error

I generated the mandelbrot_count.cu code and related codes (not the mex file) using the matlab gpu encoder, as shown in the following link:
(Code Generation by Using the GPU Coder App - MATLAB & Simulink - MathWorks 한국)
And, using the sample/test.cu generated at the same time, we tried to execute mandelbrot_count.cu. But, not build main.cu due to error messages such as Attachment 1. Please help me for what reason this error is. For reference, when name mangling is suspected and external “C” is applied as shown in Attachment 2, the same result as Attachment 3 is obtained.
For reference, my environment is Ubuntu 18.04, CUDA 11.6, NVIDIA Driver 510.47.03, RTX3080.
Attach1 :
$nvcc main.cu -o main
/tmp/tmpxft_00001312…_main.o: In function ‘main_mandelbrot_count()’:
tmpxft_00001312…_main.cudafe1.cpp:(.text+0xc5):undefined reference to ‘mandelbrot_count(double, double const*, double cosnt*, double*)’
/tmp/tmpxft_00001312…_main.o: In function ‘main’:
tmpxft_00001312…_main.cudafe1.cpp:(.text+0xe1): undefined reference to ‘mandelbrot_count_terminate()’
Attach2 : In mandelbrot_count.h file
extern “C” {
extern void mandelbrot_count(double maxIterations, const double xGrid[1000000], const double yGrid[1000000], double count[1000000]);
}
Attach3: