I've encountered a strange issue that I can only say boils down to K/N.
Static linking of SDL2 works flawlessly on macOS, however. The moment I try to statically link SDL2 on Linux it fails completely and throws out a lot of errors. HOWEVER, if the project is link with a shared lib it works fine?
I have tested the same code on C++ with the static lib to ensure there's nothing wrong with the static library during compilation and it also works fine. So there must be something going on with K/N during linking process? I will post the errors in the thread as it's hefty.
That would be hefty amount of work judging it’s using build tools to build SDL2 from source. I might just revert to using shared libs for Linux with configured rpath so that you have to provide them yourself or assume user has it…
Unsure why macOS is different that it works perfectly fine, but linux fails
a
Adam S
12/26/2023, 8:57 PM
is your project open source? I can try adding my magic Gradle tasks that can compile C/C++ using Kotlin's gcc
k
Krystian
12/27/2023, 4:38 PM
I'm not really planning to make it a framework to be used by everyone, it's just a personal project but I do have it on Github. Either way I'm more than happy with Linux taking in shared libs as I managed to get rpaths working