Derelict GLFW3 and dynamic linking on Linux

Mike Parker aldacron at gmail.com
Tue Feb 27 13:14:38 UTC 2018


On Tuesday, 27 February 2018 at 12:00:20 UTC, Kayomn wrote:

> derelict.util.exception.SymbolLoadException at ../../.dub/packages/derelict-util-2.0.6/source/derelict/util/exception.d(35): Failed to load symbol glfwSetWindowIcon from shared library /u
> sr/lib/x86_64-linux-gnu/libglfw.so.3.1
>
> I was reading this GitHub issue, and they seemed to describe 
> the issue as being version incompatibilities:
> https://github.com/DerelictOrg/DerelictGLFW3/issues/9
>
> However, I'm certain I'm using the correct GLWF version for my 
> project.

It *is* a version problem. The exception is a 
SymbolLoadException, which means the loader found the library 
just fine (you can see it in the file name, libglfw.so.3.1). 
However, it attempted to load `glfwSetWindowIcon` and failed. If 
you check the GLFW 3 documentation [1] you'll find the following:

=====
Since
     Added in version 3.2.
=====

Then, going to the DerelictGLFW3 documentation [2], you can see 
that DerelictGLFW3 2.0.0 was the last version to support 3.1.

However, you can still use the latest version of the Derelict 
binding with GLFW 3.1 if you ignore the functions from 3.2. You 
can do this via the selective loading mechanism [3].

Of course, if you need any functions from 3.2, then you should 
update your local version of GLFW.


[1] 
http://www.glfw.org/docs/latest/group__window.html#gadd7ccd39fe7a7d1f0904666ae5932dc5

[2] http://derelictorg.github.io/packages/glfw3/

[3] 
http://derelictorg.github.io/loading/failure/#selective-symbol-loading




More information about the Digitalmars-d-learn mailing list