Problem with compiling .cu code having C code


The topic title may sound confusing… So I’m.

I have a C code. Which I have compiled with gcc on linux and it compiles successfully. It has certain things like void* is assigned to void** …etc. Which are supported by C but not by C++.

But include this code in .cu with the help of #include… it gives errors to all those things which are not suported by C++.

any suggestion what can i do? i tried using that “–host-compilation” option from nvcc but that also dint help…