DLL external procedures not working in Linux
eugeneloza opened this issue · 7 comments
Well, that's quiet obvious, but the game won't compile under Linux:
Compile Project, Target: Trollhunter: Exit code 256, Errors: 1
...
Linking Trollhunter
/usr/bin/ld: cannot find -lBearLibTerminal
/usr/bin/ld: cannot find -lBeaRLibItems.dll
/usr/bin/ld: cannot find -lBeaRLibPF.dll
Trollhunter.dpr(74,1) Error: Error while linking
Trollhunter.dpr(74,1) Verbose: There were 1 errors compiling module, stopping
as it can't find/use DLL libraries in BeaRLibItems.pas, BearLibTerminal.pas and uMob.pas. Thou, as I see BeaRLib should be cross-platform? You're using this version https://github.com/bearlib, right? It does also seem to do direct *.dll calls in external definition. I've tried also compiling an example there and it doesn't work either. Well... looks unfixable (easily I mean :))?
There are cross-platform versions of libraries. Problem with pathfind only.
Running a DLL on Linux? Hmm... that shouldn't work. Linux uses *.so libraries and I couldn't find those for BearLib. Anyway, I've found one more problem for me :) DLLs are 32 bit and my Linux is 64 bit :) So it won't even run in Wine.
So, I'm not sure if its worth it. Sorry for disturbing. I'll check a Windows version when I'll have the time :)
A bit more on the issue: Seems the libraries just need to be recompiled to Linux (*.so format). The sources are available, but I'm not sure how to :)
Can these links help?
Src:
BearLibTerminal - https://bitbucket.org/cfyzium/bearlibterminal
BearLibItems - https://github.com/bearlib/items
Bin:
BearLibTerminal - http://foo.wyrd.name/en:bearlibterminal#download
Yes, it seems that all of the above are available here https://github.com/bearlib
I'll see what I can do about these. Good stimulus to learn library compilation :)
Українською теж можна :)
Вітаю брате козаче! Ще хвильку і я комітну версію без BearLibPF.dll ;) Менше .dll - легше порт на Linux :)
BearLibPF.dll випилив :)