Guevara-chan/Raylib-Forever

Incorrect library name on linux (and possibly osx) breaks linkage.

Wazubaba opened this issue · 3 comments

On linux, normally all libraries are prefixed with lib, so you need to alter your RLAPI pragma to look like this:

const PEXT* = when defined(windows):""
elif defined(macosx):"This I'm not sure, you'll have to ask an osx user"
else:"lib"
{.pragma: RLAPI, cdecl, discardable, dynlib: PEXT & "raylib" & LEXT.}

otherwise linking to the raylib library will be difficult.

OK, I guess we need some Mac* user here and I gonna implement it.
(so, libraylib.dll is liblibraylib.so under Linux ?)

No, just libraylib.so, but if you omit the lib prefix it won't be found properly by nim, that's why I suggested the PEXT addtion for linux.

Edit: Actually.. I think this might be my mistake, sorry. I think I edited my local copy of raylib.nim trying to see if I could figure out why 3D wasn't working on linux and spaced it, my bad. I do however see that a fresh download of raygui.nim is missing that lib prefix though.

On my WSL ubuntu installation, it's libraylib.so