Closed stanoddly closed 1 year ago
There seems to be an easy workaround for that. Simply rename libraylib.a
to raylib.a
and we're done 😅
Inspired by @anggape's simple solution: https://github.com/anggape/raylib-cs-wasm/blob/b6539a640c65a840924be3784b8d99636b5eb5a5/.github/workflows/gh-pages.yml#L29
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:I found that unexpectedly the
"lib"
prefix is required, even thoughDllImport
'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.This is quite weird behavior and it would require some workarounds, so preferably we need to understand what's going on.