So I added the directory with nvopencc to VC++ directories. It compiled and runs now.
Then I removed this directory and instead added $(CUDA_BIN_PATH). It works :)
So CUDA_BIN_PATH includes the path to nvopencc. Also, there’s no mention of using nvopencc in the buildlog so it might actually be normal, just unnoticeable.
In order to use the wizard, the user should first add $(CUDA_BIN_PATH), $(CUDA_INC_PATH) and perhaps $(CUDA_LIB_PATH) to the appropriate VC++ directories.
Don’t need add the add nvopencc or $(CUDA_BING_PATH) into the VC++ directories. If you add the nvopencc into this directories, the VS will compiler the cu by the nvopencc first, so it’s error!
And it also don’t need add $(CUDA_INC_PATH) and perhaps $(CUDA_LIB_PATH) to VC++ directories:) Because the wizard content them itself.
I’ve installed the new wizard (from the first post) and deleted $(CUDA_BIN_PATH), INC, and LIB from VC++ directories. It doesn’t work :(
Compiling...
wizardtest3.cu
tmpxft_00000424_00000000-3.gpu
tmpxft_00000424_00000000-7.gpu
'nvopencc' is not recognized as an internal or external command,
operable program or batch file.
Compiling manifest to resources...
Linking...
LINK : fatal error LNK1104: cannot open file '.\debug\wizardtest3.obj'
I can compile the example projects fine without CUDA_BIN_PATH in VC++ directories and just relying on the project properties. However, when I renamed nvopencc.exe, the example projects didn’t compile as well
Deleting intermediate and output files for project 'histogram64', configuration 'Release|Win32'
Performing Custom Build Step
histogram64.cu
tmpxft_00000bb0_00000000-3.gpu
tmpxft_00000bb0_00000000-7.gpu
'nvopencc' is not recognized as an internal or external command,
operable program or batch file.
Compiling...
histogram64_gold.cpp
Linking...
LINK : fatal error LNK1181: cannot open input file '.\release\histogram64.obj'
So nvopencc is also needed to compile example projects with default project settings, only it’s not explicitly indicated anywhere. Are you sure I shouldn’t need it? Try renaming nvopencc.exe to something else and see if you can compile.
AFAIK the “not recognized as an internal or external command” means it wasn’t found.
When I open a command line (dos shell) and enter “nvopencc” it does this:
C:\Documents and Settings\maciek>nvopencc
'nvopencc' is not recognized as an internal or external command,
operable program or batch file.
That’s different than if I enter “nvcc” (it pukes documentation)
So the directory with “nvopencc” is not defined in the PATH variable that the system searches for commands. More on internal and external commands here http://support.microsoft.com/kb/71986
This is why I have to add $(CUDA_BIN_PATH) to my VC++ directories.
But the nvcc will set the nvopencc into the PATH variable using the nvcc.profile ( in the bin category) when the nvcc is called. We don’t need to set them by ourself.
So I’m very strange about why it doesn’t work in yours’. :wacko:
hehe, any way, you can Set the $(CUDA_BIN_PATH) in the VC++ directories to solve it. External Media
If you are working with the Emulation. The HelloCUDA should go well.
And you should change the
if(!InitCUDA()) {
return 0;
} when your card can’t support CUDA, but want to work with the Emulation.