i am a newbie,now i can compile the samples correctly as Guide.pdf.i cp the deviceQuery.cpp and Makefile to home directory,and i edit the Makefile like this
# Add source files here
EXECUTABLE := deviceQuery
# Cuda source files (compiled with cudacc)
CUFILES :=
# C/C++ source files (compiled with gcc / c++)
CCFILES := deviceQuery.cpp
################################################################################
# Rules and targets
include ~/NVIDIA_GPU_Computing_SDK/C/common/common.mk
LIB += -lcuda
,i just change the “include…” line
include ../../common/common.mk
.But when i compile get errors.
$make
deviceQuery.cpp:14:22: error: shrUtils.h: there is no this file or dirctory
deviceQuery.cpp:15:23: error: shrQATest.h: there is no this file or dirctory
deviceQuery.cpp:24:26: error: cutil_inline.h: there is no this file or dirctory
deviceQuery.cpp: In function ‘void getCudaAttribute(T*, CUdevice_attribute, int)’:
....
Hi
Normally, you are not supposed to use the SDK’s example makefiles outside of the SDK structure since they are rather coupled. So go to ~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery and type “make”. I’m not sure whether the dependencies are well handled, so if it fails for some missing shrutil library, try to go to ~/NVIDIA_GPU_Computing_SDK/shared and type “make”.
You can also compile all the examples in one go by going to ~/NVIDIA_GPU_Computing_SDK and typing “make”.
thank you for your reply:)i can compile the samplesin ~/NVIDIA_GPU_Computing_SDK/C/src/ correctly as Guide.pdf.If i want to compile myprogram (in ~/works)with Makefile ,can i depend on the above Makefile?and how edit it?