# nvcc problem

**URL:** <https://forums.developer.nvidia.com/t/nvcc-problem/2451>\
**Category:** CUDA Programming and Performance\
**Created:** [January 28, 2008, 4:26am UTC](https://forums.developer.nvidia.com/t/nvcc-problem/2451 "2008-01-28T04:26:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dingshuai1985](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@dingshuai1985](https://forums.developer.nvidia.com/u/dingshuai1985)\
**Post date:** [January 28, 2008, 4:26am UTC](https://forums.developer.nvidia.com/t/nvcc-problem/2451/1 "2008-01-28T04:26:57Z")

</div>

When I compile with nvcc, I want to use gcc -o to compile the CPU code rather than gcc, how could I do that?

Thanks!  
Shuai

---

<div class="post-metadata">

**Author:** ![Sarnath](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sarnath/32/9742_2.png) [@Sarnath](https://forums.developer.nvidia.com/u/Sarnath)\
**Post date:** [January 28, 2008, 7:22am UTC](https://forums.developer.nvidia.com/t/nvcc-problem/2451/2 "2008-01-28T07:22:31Z")

</div>

> [@](#):
>
> When I compile with nvcc, I want to use gcc -o to compile the CPU code rather than gcc, how could I do that?
> 
> Thanks!
> 
> Shuai
> 
> [snapback]315970[/snapback]

The NVCC manual talks about passing options to host compiler – “C:\CUDA\DOC” - the toolkit doc directory - has the manual.

See the “-Xcompiler” option. I think that is what you need
