Skip to content
This repository was archived by the owner on Jul 13, 2024. It is now read-only.
This repository was archived by the owner on Jul 13, 2024. It is now read-only.

DllImport requires "libraylib" instead of the usual "raylib" #2

@stanoddly

Description

@stanoddly

Raylib-csTo call a native library DllImport attribute is used. This attribute expect a name of the library, however the name "raylib" from Raylib-CS doesn't work, the web page fails with:

dotnet.js:2167 System.DllNotFoundException: raylib

I found that unexpectedly the "lib" prefix is required, even though DllImport's name resolution should be able to handle the prefix just fine. The only official information I found is from (Mono docs)[https://www.mono-project.com/docs/advanced/pinvoke/#library-names]) though.

So instead of "raylib, "libraylib is used in the code.

        /// <summary>
        /// Used by DllImport to load the native library
        /// </summary>
        public const string nativeLibName = "raylib";

This is quite weird behavior and it would require some workarounds, so preferably we need to understand what's going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug with workaround which needs to be resolved anyway.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions