export PATH=/usr/local/cuda-7.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH
cuda-install-samples-7.0.sh
cd ~/NVIDIA_CUDA-Samples_7.0/0_Simple/vectorAdd
make
./vectorAdd
验证是否安装成功,在终端执行命令:nvcc -V,如果安装成功,则会有相应的版本信息。
(3)安装Qt
sudo apt-get install build-essential qt5-default qtcreator -y
如果有问题,去掉-y,提示y/n时候手动输入y
在qt-creator中配置
Tools->Options->Build & Run->Compilers
选择Add button and select ‘GCC’, in the ‘Compiler path’ text box, place the path to the gcc compiler. On a standard installation the path is :/usr/bin/gcc.
check the ‘Kits’ setting, selecting the Desktop(default) kit, you should see Compiler:GCC, the name GCC should match the Compiler named in the previous tab.
如果你编译某个package时候qt编译不通过,可以尝试再配置一下DigiaQtOpenSource-qtcreator.desktop
在Exec=后面加上bash -i -c
(4