cuda samples with graphics don't compile due to unresolved libGL on ubuntu 14.04 x86_64

Hi All,
My cuda install onto fresh Ubuntu 14.04 running on an x86_64 works now with the samples that don’t have graphics. But any of the samples that have graphics fail to compile due to libGL not being found. I have installed libglib2.0-dev, freeglut3-dev, libgtk2.0-dev using ‘sudo apt-get’. Is there something else I need to install? From ‘make’:

/usr/bin/ld: cannot find -lGL

From 'ld -IGL --verbose:

attempt to open //usr/local/lib/x86_64-linux-gnu/ failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libGL.a failed

ld: cannot find -lGL

In /usr/local/lib/x86_64_linux-gnu, is a link to mesa/, which is a link to, which doesn’t exist.

I’d appreciate any advice or suggestions. This is getting pretty frustrating! Thanks! /jd

When I did the cuda install, I used the runfile method. I answered ‘yes’ to all the questions it asked. One of them was

Install NVIDIA’s 32-bit compatibility OpenGL libraries?"

Could this have somehow messed up my environment? Should I have said ‘no’?

I’ve google-seached with various statements of my problem. Lots of people have posted to install some special version of something or other, or move some symbolic links deep in my system. Mostly I don’t know the intent of these suggestions so I don’t want to damage my system further by blindly following some instructions that might not apply to me. Maybe one is the right answer, but how can I tell?

Thanks for your help!