Jump to content

Linux SDL2 Shared Library Problems


practicing01

Recommended Posts

Hello, I'm trying to link my sdl2 library into my games directory because it was complaining that it couldn't find sdl2. I ran "/usr/lib/x86_64-linux-gnu $ sudo ln -s libSDL2-2.0.so.0.2.0 ~/Desktop/game/libSDL2-2.0.so.0" but the game tells me: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory I compiled/ran the game fine on one computer then copy/pasted the game to another (the other computer is having this issue). Thanks for any help.

Link to comment
Share on other sites

Yeah, GTK is used for the native file dialogs in Linux to render them.


For release projects, I'm adding it in so if you disable the TORQUE_TOOLS flag in cmake, it'll not include the file dialogs(since those are only used in the tools anyways) so that endusers don't need to make sure gtk is installed.


For anyone wanting to use the tools with the file dialogs though, you need to have gtk installed on Linux. I thought I updated the wiki page, but I may not have.


Anywho, getting the gtk package with 'pkg-config --cflags --libs gtk+-3.0' should get it installed for you. I'll make sure the docs are updated and get the tweak to cmake pushed tonight(as well as making static SDL the default :) )

Link to comment
Share on other sites

Yeah, I think linux just has much stricter handling for 32/64 bits.


I'd read somewhere you just have to have 2 builds and use the appropriate version based on which archetecture you're running. I'll look into it some to see if there's a sidestep.


As for the SDL static and gtk stuff, can you test this?


https://github.com/GarageGames/Torque3D/pull/1627


That statics SDL, and also hooks the file dialogue usage to TORQUE_PLAYER. If you flip on the TORQUE_PLAYER flag, which implies it's intended for end-user players and thus the tools won't be needed, it'll basically drop the file dialog stuff from the project, so that you don't need to install gtk to simply run the game if you're an end-user.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...