My least favourite part of game development (so far) is finding, building and linking libraries into my projects, especially when the language I’m using isn’t industry standard (D). The other day, I ran into an issue where I tried expanding the list of libraries I was using in denj and instead broke all of them by accidentally upgrading them and rebuilding them all. It would pay to mention that all the libraries I’m using so far are a part of a collection of libraries called DerelictOrg, and as such all rely on one utility library called DerelictUtil. This, I found after hours of searching, was the problem. All the libraries I was using (DerelictGL3, DerelictSDL2, and DerelictASSIMP3) depended upon DerelictUtil version 1.9.something, but the version in the master branch of the git repository was 1.0.3. This meant that everytime I tried to link I’d get a convoluted linker error about an undefined symbol,
which demangled is
(This is here so google can find it when other people have the same issue, sorry)
Eventually I figured out that the proper version of DerelictUtil was in a branch ‘2.0’, built it with
dub build, linked it, and continued on with my life. This wouldn’t have been a problem if I were using the project manager for D, ‘dub,’ because it fetches the correctly versioned libraries from a central repository and makes life easier, but it imposes a file structure and requires extra files to describe the project so it’s not for me.
I recommend anyone building derelict from the git repos to keep this in mind.