• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Linux Ubuntu Extension: shared object not found

babyjeans

Member
Not sure what I'm doing wrong, but I've compiled my extension under linux with the `-m32` flag, ensuring its a 32bit build, and I've included it in my GMS2 Extension as a 'proxy' of the windows.dll. I've also named the .so file the exact same thing as the .dll and also tried naming it `lib<name>.so` to no avail.

When the game loads in VM / YYC in Ubuntu it says it can't load the shared object, there's no such file. I see it in ~/GameMakerStudio2/assets - so what gives? any ideas?
 

babyjeans

Member
I've noticed two problems so far:

  • I'm using CMake to build it - I needed to set the library to be a MODULE not SHARED in order for GMS2 to be able to use - Modules are different in that they're intended to be opened at run-time, and not run-time linked like a shared library.
  • Renaming the file to be the same as the DLL, but using NO extension rather than .so allows it to load. So, in my instance, I'm using `outsidethebox.dll` with `outsidethebox` as a proxy for the Ubuntu target... rather than using `outsidethebox.so`
    • This seems wrong?

Still messing with it, but this has gotten me going. Figured I'd leave my findings here for anyone else who might have a question.
 

Mick

Member
Renaming the file to be the same as the DLL, but using NO extension rather than .so allows it to load. So, in my instance, I'm using `outsidethebox.dll` with `outsidethebox` as a proxy for the Ubuntu target... rather than using `outsidethebox.so`
  • This seems wrong?
This is wrong, I just had the same problem and filed a bug report.
 

babyjeans

Member
It's also not loading the first function definition from the non .so version, but will load ONLY the first if you include a .so.

I also filed a report!
 

babyjeans

Member
Unfortunately, it also affects the OSX target - but it's not easy to get a no-extension dylib on that platform since the asset compiler crashes if you try. I had to rename it manually once I was hooked to the Runner via lldb. This is obviously not a solution at all.

EDIT:

I reported another bug to make sure OSX was covered - but dylib extensions on OSX are entirely unusable in the current state... I hope we get a fix sooner than later.
 
Top