开发者

Problem with compiling n-body simulation with CUDA

I have a linux ubuntu 10.04 LTS freshly installed on my x64 PC, and I just followed this step-by-step installation guide to install NVidia CUDA on my PC. But when I cd into ~/NVIDIA_GPU_Computing_SDK/C/src/nbody and try to make 开发者_如何学Gothe nbody simulation, it just prints out:

/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [../../bin/linux/release/nbody] Error 1

Is this a solvable problem? I'm a newbie in Linux (and in Cuda programming) so please help me understanding.


cd /usr/lib/

ls -la | grep libGL.so 

if libGL.so exists

sudo rm libGL.so

then run

sudo ln -s libGL.so.270.41.19 libGL.so

or whatever version of libGL.so you have


Use the Synaptic Package Manager and install the packages with libgl, libglu, libglut, etc. For example, libgl1-mesa and all its dev variants, freeglut, etc.

sudo apt-get install build-essential x-window-system-dev will also get you the vast majority of those.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜