# Unable to link Glew library

**URL:** <https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885>\
**Category:** CUDA Programming and Performance\
**Tags:** cuda\
**Created:** [December 2, 2020, 5:44am UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885 "2020-12-02T05:44:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saranyasathees.111](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@saranyasathees.111](https://forums.developer.nvidia.com/u/saranyasathees.111)\
**Post date:** [December 2, 2020, 5:44am UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885/1 "2020-12-02T05:44:14Z")

</div>

Hi,

I am trying to implement a CUDA GL interop program.I have seen cuda by example pdf provided by Nvidia as well.

I am trying to compile my code using nvcc compiler with -lglew linker along with other GL,glfw libraries.It shows -lglew not found.libGlew.so is present in jetson installation when i checked.Can anyone provide a solution to this?

---

<div class="post-metadata">

**Author:** ![Robert\_Crovella](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/robert_crovella/32/14043_2.png) [@Robert\_Crovella](https://forums.developer.nvidia.com/u/Robert_Crovella)\
**Post date:** [December 2, 2020, 3:40pm UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885/2 "2020-12-02T15:40:14Z")

</div>

on linux it is libGLEW.so, and the corresponding switch is `-lGLEW` not `-lglew`

something like

`-lGLEW -lGLU -lGL `

is usually needed

---

<div class="post-metadata">

**Author:** ![saranyasathees.111](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@saranyasathees.111](https://forums.developer.nvidia.com/u/saranyasathees.111)\
**Post date:** [December 3, 2020, 7:58am UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885/3 "2020-12-03T07:58:45Z")

</div>

Hello Robert,

Thanks for the response.  
But the problem persists.

nvcc \<fname.cu\> -o \<fname.out\> -lGLEW -lGLU -lGL -lglfw is what i am using.

i have included the path usr/include/GL in the LD\_LIBRARY\_PATH variable in bashrc as well.

unable to understand where the problem lies in my case.Any thoughts?

---

<div class="post-metadata">

**Author:** ![Robert\_Crovella](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/robert_crovella/32/14043_2.png) [@Robert\_Crovella](https://forums.developer.nvidia.com/u/Robert_Crovella)\
**Post date:** [December 3, 2020, 2:35pm UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885/4 "2020-12-03T14:35:31Z")

</div>

is `libGLEW.so` present somewhere? (not libGLew or any other spelling) If so, where is it, exactly?

---

<div class="post-metadata">

**Author:** ![saranyasathees.111](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@saranyasathees.111](https://forums.developer.nvidia.com/u/saranyasathees.111)\
**Post date:** [December 4, 2020, 4:38am UTC](https://forums.developer.nvidia.com/t/unable-to-link-glew-library/160885/5 "2020-12-04T04:38:32Z")

</div>

Yes it is present at usr/lib/aarch64-linux-gnu.

To kickstart my interop program for now i have changed to gl,h and freeglut header and it runs.
