Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Linux] GLFW/SDL native library not loaded #652

Closed
@marius-klimantavicius

Description

@marius-klimantavicius

Summary

On linux the simplest sample fails because windowing platform fails to load native library.
Ultz.Native does place .so file, but it is under runtimes/linux-x64/native however the default path resolvers does not check this path.

Steps to reproduce

  • Platform: Desktop/Linux
  • Framework Version: .NET 5
  • API: GLFW
  1. Created a new .net5 project (I was using Rider for that)
  2. Added Silk.NET reference
  3. Copied sample code from https://github.com/dotnet/Silk.NET/blob/main/examples/CSharp/OpenGL%20Tutorials/Tutorial%201.1%20-%20Hello%20Window/Program.cs

The application fails to run.

Comments

I get exception: The currently bound window platform(s) only support views, instead of windows. Use the view APIs instead.
After some debugging I narrowed it down to inability to load glfw library even though it is available at output runtimes/linux-x64/native/libglfw.so.3.

If I set LD_LIBRARY_PATH=runtimes/linux-x64/native then I can run the example.
However I think that the default loader could also check this directory for native libraries.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions