Giter VIP home page Giter VIP logo

Comments (10)

ZILtoid1991 avatar ZILtoid1991 commented on August 23, 2024

What version of libSDL2.so do you use? I got a similar error once under Windows for using a slightly out of date version of SDL2.dll

from derelictsdl2.

SaurabhTotey avatar SaurabhTotey commented on August 23, 2024

It seems like I have the LibSDL2 version of 2.0.4+dfsg1-2ubuntu2. According to the APT, this was the newest version. I tried running sudo apt-get --reinstall install libsdl2-dev, but that that didn't fix my issues when running the application with dub.

from derelictsdl2.

ZILtoid1991 avatar ZILtoid1991 commented on August 23, 2024

The symbol SDL_DequeueAudio is present since 2.0.5. You have to somehow get that version, or you're going to have issues with it. Check if your version of Linux have the newest version of LibSDL2

from derelictsdl2.

SaurabhTotey avatar SaurabhTotey commented on August 23, 2024

Huh, that's probably it. Thanks. As of right now, it doesn't seem like there is a LibSDL2 2.0.5 for Linux Mint, so that's unfortunate. Regardless, that seems to be the issue.

from derelictsdl2.

mdparker avatar mdparker commented on August 23, 2024

This causes the program to exit with code 1

That's irrelevant. The interesting information in this case is the message in the first line that starts with "derelict.util.exception.SymbolLoadException". It tells you exactly why the library failed to load. Anytime you're missing a symbol, the first thing to do is to check which version of the shared library you have and which version(s) the binding supports.

In this case, there's an easy workaround. DerelictSDL2 has support for Derelict's SharedLibVersion. By default, it will attempt to load SDL 2.0.5, but you can specify a minimum version and it will not throw exceptions when any symbols from later versions are missing. So if you know you are never using any functions added later than, say, 2.0.0, you could do this:

DerelictSDL2.load(SharedLibVersion(2, 0, 0);

It's all described in the Derelict documentation.

from derelictsdl2.

ZILtoid1991 avatar ZILtoid1991 commented on August 23, 2024

If you want to use 2.0.5, then you can do it by downloading the source of SDL2, then compile it yourself. I did the same with a few applications under Debian, if they don't have a lot of dependencies then it's pretty viable. Also look around Unstable and Testing channels for newer versions.

Or just force the loader to work with version 2.0.4 or lower.

from derelictsdl2.

mdparker avatar mdparker commented on August 23, 2024

I strongly recommend using SharedLibVersion for anything you plan to distribute. Install what you like on your local machine, but if you aren't using any functions from 2.0.5, there's no reason to require users to have it. Load the minimum version you need.

from derelictsdl2.

Rageoholic avatar Rageoholic commented on August 23, 2024

Just would like to note this same bug happens when you specify 2.0.4 and 2.0.3. It looks like there might actually just be a bug here?

from derelictsdl2.

mdparker avatar mdparker commented on August 23, 2024

Do you mean you're seeing a SymbolLoadException that says SDL_DequeueAudio is missing when you specify SharedLibVersion(2,0,4) or SharedLibVersion(2,0,3)?

from derelictsdl2.

mdparker avatar mdparker commented on August 23, 2024

You're right. There were a couple of problems with the loader. I never caught it because I was always loading SDL 2.0.5. Should be fixed in 3.0.0-beta.4.

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.