Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Dipper

Pages: [1]
1
General / Link executable to work with all 2.x SFML libs
« on: June 26, 2019, 03:39:04 pm »
I wanted to run my game on other Linux machine where I had installed the newest SFML using package manager. The executable refused to work with the following error:
./space-logic-adventure: error while loading shared libraries: libsfml-system.so.2.4: cannot open shared object file: No such file or directory
 

It makes sense because I compiled it over a year ago using an older version of SFML. After recompiling the game from the source, it runs as intended. But is it possible to compile it once to work will all future 2.x SFML versions? I wanted to publish an executable for download and it seems I'd have to update it once in a while.

I define linking to SFML in CMakeLists.txt as follows:
find_package(SFML 2 REQUIRED audio graphics window system)
include_directories(${SFML_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} sfml-audio sfml-graphics sfml-window sfml-system)
 

If what I'm asking for is not possible or sounds dumb to you, please explain; I'm not proficient in libraries/linking etc. I wouldn't want to link it statically. Bundling *.so files seems suboptimal to me, but maybe it is a proper way? That's what I do on Windows with dlls.

2
Audio / Getting notification when music ends
« on: April 24, 2015, 01:00:11 pm »
I plan to use SFML to play audio in my music player and now I'm wondering if there's an option to be notified about the end of the track (using sf::Music). I thinking of a callback or similar.
It would help a lot with the implementation of a playlist.

Pages: [1]