解决方法 在g++语句最后 加上 -I/usr/local/cuda/include (libcudart.so所在的地方) g++ -g -std=c++11 -I/usr/local/cuda/include