Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Loading Issues #265

Open
Haltroy opened this issue Jul 12, 2024 · 2 comments
Open

Library Loading Issues #265

Haltroy opened this issue Jul 12, 2024 · 2 comments

Comments

@Haltroy
Copy link

Haltroy commented Jul 12, 2024

Hi, I just started using this library and I already loved it but it has some issues on my end:

  • System.DLLNotFoundException on native libraries because the NuGet package's native libraries start with "lib" and it is trying to load those libraries without the "lib" part (trying to load 'csfml-audio' instead of 'libcsfml-audio'). I worked around it by renaming each library.
  • It is not detecting the system's libFLAC installation (libFLAC.so.12.1.0 in my case) and asks for libFLAC.so.8: instead. Resulting another DLLNotFoundException. I worked around this one as well by just copying my libFLAC to the runtimes/linux-x64/native folder and naming it accordingly. The NuGet package is missing the libFLAC.so.8 file (also on every system). I don't use FLAC audio but it is required by SFML so it creates problems.

NOTE: Installing the SFML and CSFML packages from distribution packages does fix both issues.

More Information:

  • System: Arch Linux
  • FLAC version 1.4.3
  • .NET 8.0 project
  • Using NuGet Package SFML.Audio (I only need audio for now) version 2.6.0
@eXpl0it3r
Copy link
Member

On Linux we usually require users to install their dependencies. It seems that libFLAC.so.8 refers to FLAC 1.3.

Currently, I wouldn't want to change this, but maybe we can further document the requirements.

@Haltroy
Copy link
Author

Haltroy commented Jul 17, 2024

I can copy the libFLAC.so file to the SFML native binaries folder on end product with no issues but the first "trying to load csfml-audio instead of libcsfml-audio" requires more changes.

My recommendations:

  • Tell the build system that builds those libraries for Linux to not put "lib" in front of them. (CMake ex.: set(CMAKE_STATIC_LIBRARY_PREFIX ""))
  • Check if OS is Linux then put "lib" in front of the library name on the this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants