how to use nvcc

I used vs2005 to compile my program before .But now I want to use nvcc to complie my .cu file to make sure how many shared memory and register used . I never use nvcc before,when i use “nvcc -ptx” in DOS shell,it shows "can’t find the file cl.exe ".what can i do to solve this.And maybe somthing should be done before using nvcc.Someone can give me some suggestion?Thx in advance.

cl is the linker. If you just want to find out the register and shared memory usage, this should work ( compile without linking):
nvcc --ptxas-options=-v -c

Thanks for your quick reply.
But it still doesn’t work.
This is the error message:
“nvcc fatal: Cant’t find the compiler cl.exe in PATH”
And i want to know what should the PATH be in nvcc.profile and where can i get the cl.exe?

I add the directory including cl.exe to the PATH ,and now there is a new error:
“cl:Command line error D8003 :missing source filename”.
What does that mean? :(
and my nvcc.profile as follows:

TOP = $(HERE)…

PATH += (TOP)\extools\bin;(TOP)\open64\bin;(TOP)\bin;(TOP)\lib;$(TOP)\

PATH +=C:\Program Files\Microsoft Visual Studio 8\VC\bin

INCLUDES += “-I$(TOP)\include” “-I$(TOP)\include\cudart” $(SPACE)
INCLUDES += "-Ie:\Austin\common\inc

LIBRARIES =+ (_SPACE_) "\LIBPATH:(TOP)\lib" cudart.lib

compiler-bindir=C:\Program Files\Microsoft Visual Studio 8\VC\bin


Why do you want to use nvcc to see “how many shared memory and register used” alone? Just open your project in vs2005, right-click on your .cu file in “solution explorer” (at the left side of your workspace by default), and on the pop-up menu click “properties”. Then go to “custom build steps” at the left, and edit line “command line” by adding “-keep” param. And compile again using vs2005. In your project home sirectory you will find .cubin file with shared memory and register information, and a lof of other stuff :)

It’s very useful.How can i express my appreciation to you. :)Thanks again!