# Problem with compiling .cu code having C code

**URL:** <https://forums.developer.nvidia.com/t/problem-with-compiling-cu-code-having-c-code/11983>\
**Category:** CUDA Programming and Performance\
**Created:** [September 5, 2009, 8:51am UTC](https://forums.developer.nvidia.com/t/problem-with-compiling-cu-code-having-c-code/11983 "2009-09-05T08:51:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetan\_khaladkar](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Chetan\_khaladkar](https://forums.developer.nvidia.com/u/Chetan_khaladkar)\
**Post date:** [September 5, 2009, 8:51am UTC](https://forums.developer.nvidia.com/t/problem-with-compiling-cu-code-having-c-code/11983/1 "2009-09-05T08:51:52Z")

</div>

Hi,

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…
