There is a template project in the SDK when you can copy and modify to include your sources (instructions are in the README). Using this project, compiling emulation mode is as easy as changing the build mode in visual studio, as there are separate modes built into the project for emulation debug, non debug emulation, etc…
ramesh2006 gave your a command line to build the project and run in emulation model.
And you can also use the VS ,and choose the build model by emulation;
I am new to using both CUDA and Visual Studio. I copied my project from the template, so I have four build modes, which all work, but I have another problem with the debug emulation mode. When debugging in emulation mode, if I try to step into a kernel invocation, it informs me that there is no source code for the kernel, just like when running in “normal” modes. How do you solve this problem?
I am running Visual Studio 8.