# Static lib problem probably

**URL:** <https://discourse.glfw.org/t/static-lib-problem-probably/1146>\
**Category:** support\
**Created:** [July 6, 2018, 6:40am UTC](https://discourse.glfw.org/t/static-lib-problem-probably/1146 "2018-07-06T06:40:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkM](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@MarkM](https://discourse.glfw.org/u/MarkM)\
**Post date:** [July 6, 2018, 6:40am UTC](https://discourse.glfw.org/t/static-lib-problem-probably/1146/1 "2018-07-06T06:40:36Z")

</div>

Hi all, probably basic issue. So, I’ve got an app that uses cpp bindings to glfw. But it requires latest version of glfw. I have 3.1.2 at the moment, but downloaded and compiled libglfw from source. However I got: In function `TWorld::OnKeyDown(int)': World.cpp:(.text+0x2505): undefined reference to`glfwGetKeyName’ . Which, to my limited knowledge means that static lib hasn’t been updated. What should I do? System Linux, Debian-like, Ubuntu descendant, nvidia390.

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [July 6, 2018, 8:38am UTC](https://discourse.glfw.org/t/static-lib-problem-probably/1146/2 "2018-07-06T08:38:29Z")

</div>

[glfwGetKeyName](http://www.glfw.org/docs/latest/input_guide.html#input_key_name) was introduced in [version 3.2](http://www.glfw.org/changelog.html), so if you downloaded the latest source package from [http://www.glfw.org/download.html](http://www.glfw.org/download.html) then you should have that function. You should be able to check the code you have to see.

However “undefined reference” is a linker error rather than a compile error. This means that the function declaration in the header was found, but there is some problem in matching that to a compiled function. This could be due to not linking with the right library - your program might be linking to the system installed library rather than the one you just compiled.

---

<div class="post-metadata">

**Author:** ![MarkM](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@MarkM](https://discourse.glfw.org/u/MarkM)\
**Post date:** [July 6, 2018, 8:58am UTC](https://discourse.glfw.org/t/static-lib-problem-probably/1146/3 "2018-07-06T08:58:17Z")

</div>

Exactly. Maybe I described it a too vague way.  
I found out that while the library compiles and installs without any apparent issue, it does not update libglfw.so . But only when installed from source. I just downloaded deb from distro up (I have stable derivative of Ubuntu 16.04, debs with libglfw 3.2.1 are in 18.04 and up). And installed from deb it worked like a charm. But from source there should be at least a warning of sorts.
