Jebbs / DSFML

DSFML is a D binding of SFML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tutorial - How to install in Linux?

leotada opened this issue · 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.

Can you post the errors you're getting?

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 .

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

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

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.