problem description
< H2 > break it up ~ it would be nice to delete all the previous compilation results and recompile them. < / H2 > Environment: qtcreator project
references the cuda_runtime.h file, which is referenced in the cpp source file, and can be compiled and run, but not in the h header file?
the environmental background of the problems and what methods you have tried
this is how references are written in cpp
-sharpinclude "gpucalculatethread.h"
-sharpinclude <cuda_runtime.h>
-sharpinclude <cublas_v2.h>
-sharpinclude <helper_cuda.h>
.pro file is written like this
INCLUDEPATH += \
$$(CUDA_COMMON_PATH) \
$$(CUDA_INCLUDE_PATH) \
$$(VTK_INCLUDE_PATH) \
../../Include
compilation runs well at this time;
I changed it to the header file
-sharpinclude <cuda_runtime.h>
-sharpinclude <cublas_v2.h>
-sharpinclude <helper_cuda.h>
error is reported when compiling
fatal error C1083: : "cuda_runtime.h" : No such file or directory
later I changed the reference in the header file to the absolute path
-sharpinclude "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/include/cuda_runtime.h"
-sharpinclude "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/include/cublas_v2.h"
-sharpinclude "C:/ProgramData/NVIDIA Corporation/CUDA Samples/v9.2/common/inc/helper_cuda.h"
report an error again
c:\program files\nvidia gpu computing toolkit\cuda\v9.2\include\cublas_api.h(75): fatal error C1083: : "cuda_fp16.h" : No such file or directory
I modified the .pro file again
INCLUDEPATH += \
-sharp$$(CUDA_COMMON_PATH) \
-sharp$$(CUDA_INCLUDE_PATH) \
$$(VTK_INCLUDE_PATH) \
"C:/ProgramData/NVIDIA Corporation/CUDA Samples/v9.2/common/inc/" \
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v9.2/include/" \
../../Include
same error prompt
c:\program files\nvidia gpu computing toolkit\cuda\v9.2\include\cublas_api.h(75): fatal error C1083: : "cuda_fp16.h" : No such file or directory
this < cuda_fp16.h > is referenced in cublas_api.h.
what"s the difference at compile time between referencing the .h file in the source file and referencing the header file in the .h file?
how should I change it?
ask the boss to give us some advice ~ Please indicate what information you need to add.