Giter VIP home page Giter VIP logo

Comments (2)

JonathanILevi avatar JonathanILevi commented on August 23, 2024

It appears that none of the functions are dynamically linking correctly. I commented out the bindFunc for SDL_DequeueAudio and it failed on another, and when I commented out that line it failed on another...

from derelictsdl2.

mdparker avatar mdparker commented on August 23, 2024

Your system has a version of SDL older than the one DerelictSDL2 3.0.0-beta tries to load by default. The documentation tells you that 3.0.0 beta supports up to SDL 2.0.5. That's what it tries to load by default.

The SDL changelog, or, more simply, the DerelictSDL2 loader source, will tell you that SDL_Dequeue audio was added in 2.0.5. Specifically, you can see in the source that all of the functions you were missing are part of SDL 2.0.5. I know that because if SDL_Dequeue audio was the first function to fail, that means SDL 2.0.0 - 2.0.4 loaded successfully -- so you have SDL 2.0.4 installed.

The solution is to only load the version of SDL you actually need. If, for example, you don't need any SDL functions from any version higher than 2.0.0, then you can do this:

import derelict.util.loader : ShaderLibVersion;
DerelictSDL2.load(SharedLibVersion(2, 0, 0));

In my case, I like to use the filesystem API (SDL_GetPrefPath & SDL_GetBasePath) which was added in 2.0.1, but which was buggy on Windows until SDL 2.0.2:

version(Windows) DerelictSDL2.load(SharedLibVersion(2, 0, 2));
else DerelictSDL2.load(SharedLibVersion(2, 0, 1));

from derelictsdl2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.