当前位置: 技术问答>linux和unix
为什么出现了nvcc fatal: don't know what to do with 'CudaProgram3'
来源: 互联网 发布时间:2016-11-09
本文导语: 我在同一个文件夹下面写上CudaProgram3.cu 和一个Makefile文件 我的makefile是这么写的: NVCC = /usr/local/cuda/bin/nvcc CUDAPATH = usr/local/cuda NVCCFLAGS = -I/usr/openwin/include –I$(CUDAPATH)/include LFLAGS = -L/usr/openwin/lib –L/usr/X11R6/li...
我在同一个文件夹下面写上CudaProgram3.cu 和一个Makefile文件
我的makefile是这么写的:
NVCC = /usr/local/cuda/bin/nvcc
CUDAPATH = usr/local/cuda
NVCCFLAGS = -I/usr/openwin/include –I$(CUDAPATH)/include
LFLAGS = -L/usr/openwin/lib –L/usr/X11R6/lib –lX11 -L$(CUDAPATH)/lib64 –lcuda –lcudart -lm
CudaProgram3:
$(NVCC) $(NVCCFLAGS) $(LFLAGS) –o CudaProgram3 CudaProgram3.cu
然后make ,就出现:vcc fatal: don't know what to do with 'CudaProgram3'
为何?
我的makefile是这么写的:
NVCC = /usr/local/cuda/bin/nvcc
CUDAPATH = usr/local/cuda
NVCCFLAGS = -I/usr/openwin/include –I$(CUDAPATH)/include
LFLAGS = -L/usr/openwin/lib –L/usr/X11R6/lib –lX11 -L$(CUDAPATH)/lib64 –lcuda –lcudart -lm
CudaProgram3:
$(NVCC) $(NVCCFLAGS) $(LFLAGS) –o CudaProgram3 CudaProgram3.cu
然后make ,就出现:vcc fatal: don't know what to do with 'CudaProgram3'
为何?
|
CudaProgram3:
这里必须用一个TAB。没有就不行,用空格也不行$(NVCC) $(NVCCFLAGS) $(LFLAGS) –o CudaProgram3 CudaProgram3.cu
这里必须用一个TAB。没有就不行,用空格也不行$(NVCC) $(NVCCFLAGS) $(LFLAGS) –o CudaProgram3 CudaProgram3.cu
|
应该是“-”的问题