# sample code compilation error

**URL:** <https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054>\
**Category:** CUDA Programming and Performance\
**Created:** [April 18, 2011, 6:14am UTC](https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054 "2011-04-18T06:14:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunnyhay](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sunnyhay](https://forums.developer.nvidia.com/u/sunnyhay)\
**Post date:** [April 18, 2011, 6:14am UTC](https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054/1 "2011-04-18T06:14:56Z")

</div>

Hi All,

This is the error message.

make -C src/volumeRender/  
make[1]: Entering directory `/home/sunnyhay/NVIDIA\_GPU\_Computing\_SDK/C/src/volumeRender’  
volumeRender.cpp:66: warning: deprecated conversion from string constant to  
volumeRender.cpp:259: warning: unused parameter  
volumeRender.cpp:259: warning: unused parameter  
/usr/bin/ld: cannot find -lGL  
collect2: ld returned 1 exit status  
make[1]: \*\*\* […/…/bin/linux/release/volumeRender] Error 1

Clearly the module GL cannot be loaded. But what is GL? glut or openGL? I tried to install everything (those lib\*\*-dev files) I could imagine on my Ubuntu but failed eventually to fix the problem.  
Does anybody tell me the exact name of the module I can apt-get install or indicate the detailed cause of the problem?  
Thank you!

---

<div class="post-metadata">

**Author:** ![avidday](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/avidday/32/59219_2.png) [@avidday](https://forums.developer.nvidia.com/u/avidday)\
**Post date:** [April 18, 2011, 7:29am UTC](https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054/2 "2011-04-18T07:29:20Z")

</div>

Not finding libGL means you do not have the NVIDIA driver installed correctly - the library ships in the driver bundle NVIDIA distribute.

---

<div class="post-metadata">

**Author:** ![sserg](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/sserg/32/9977_2.png) [@sserg](https://forums.developer.nvidia.com/u/sserg)\
**Post date:** [April 18, 2011, 8:23am UTC](https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054/3 "2011-04-18T08:23:20Z")

</div>

> [@](#):
>
> /usr/bin/ld: cannot find -lGL

In my case (ubuntu 10.10) I installed libglut3-dev package manually and this fixed the issue. Also a couple of extra libraries were required for my distrubution: libXi and some else. It depends on the CUDA SDK sample application dependences.

---

<div class="post-metadata">

**Author:** ![avidday](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/avidday/32/59219_2.png) [@avidday](https://forums.developer.nvidia.com/u/avidday)\
**Post date:** [April 18, 2011, 8:49am UTC](https://forums.developer.nvidia.com/t/sample-code-compilation-error/22054/4 "2011-04-18T08:49:53Z")

</div>

Not finding libGL has nothing to do with either GLUT or Xinput.
