1

I'm creating a Derelict application and apparently derelict needs the shared libraries to be in the root path. Is there a way to do this using DUB, without copying the files over manually into the ./bin folder? (Just have them get copied when building automatically)

Also I am assuming the .so files for Linux systems will have to be in the binary folder too. I know there is "copyFiles" but where will the files get copied from, where will they get copied to? Is this cross-platform?

Jeroen
  • 15,257
  • 12
  • 59
  • 102

1 Answers1

1

On Linux you'd normally just have the necessary libraries installed system wide using your distribution's package manager.

On Windows DLLs are often placed in the application's folder and copyFiles exists for exactly this reason.

This is what I have in my DUB package.json for an application that uses Derelict GLFW and Derelict FreeImage:

"copyFiles": [
    "lib/glfw3.dll",
    "lib/FreeImage.dll"
]

The files are copied from the lib folder in the root of my project and they are copied to the random temporary folder dub uses for building (I imagine on linux it's somewhere in /tmp and on Windows it's in somewhere like %APPDATA%\Temp\dub).

eco
  • 2,219
  • 15
  • 20
  • The problem is though, those files aren't present in my directory, they are in the derelict one. – Jeroen Dec 31 '13 at 18:31
  • Derelict doesn't ship with any binaries to my knowledge. What files are you referring to? – eco Dec 31 '13 at 18:47
  • Linux does however require it's own libraries in the binary path, I suppose I have to use the OS suffix? – Jeroen Dec 31 '13 at 19:40