Jebbs / DSFML

DSFML is a D binding of SFML
Other
95 stars 23 forks source link

Tutorial - How to install in Linux? #245

Open leotada opened 7 years ago

leotada commented 7 years ago

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.

Jebbs commented 7 years ago

Can you post the errors you're getting?

leotada commented 7 years ago

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 .

Jebbs commented 7 years ago

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

leotada commented 7 years ago

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

Jebbs commented 7 years ago

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.