DSFML icon indicating copy to clipboard operation
DSFML copied to clipboard

Tutorial - How to install in Linux?

Open leotada opened this issue 8 years ago • 5 comments

I can't use DSFML yet, after many tries. Please make a tutorial to explain. I have built DSFMLC and install it. After I used Dub to run app with DSFML as dependency, but didn't work. Tried to build DSFML from source, didn't work too.

leotada avatar Jan 22 '17 15:01 leotada

Can you post the errors you're getting?

Jebbs avatar Jan 22 '17 22:01 Jebbs

Running ./dsfmlgame ./dsfmlgame: error while loading shared libraries: libdsfmlc-audio.so.2: cannot open shared object file: No such file or directory

As I said, DSFMLC has already been installed using the 'sudo make install' command. The 'libdsfmlc-audio.so.2' file is in /usr/local/lib .

leotada avatar Jan 23 '17 02:01 leotada

That's a runtime issue, not a compiler issue. usr/local/lib is not always searched at runtime for .so files.

Try this: export LD_LIBRARY_PATH=/usr/local/lib && dub run

Jebbs avatar Jan 23 '17 06:01 Jebbs

It works! Thank you. Can this be more explained in the website?

leotada avatar Jan 23 '17 14:01 leotada

Hopefully I won't need to. The next version of DSFML will use SFML libraries directly, so you should in theory be able to use the SFML libraries your distro installs for you (which will be in a known runtime path location). The rest (DSFMC and DSFML) will be linked in statically, thus not needing to be found at runtime.

I still might mention it though. Some people will build SFML from source, so I guess it would be useful info for them.

Jebbs avatar Jan 24 '17 20:01 Jebbs