Thread overview
Derelict3: can't load a shared library
Nov 02, 2012
Andrey
Nov 03, 2012
Mike Parker
Nov 03, 2012
Andrey
Nov 04, 2012
bioinfornatics
November 02, 2012
I know this isn't quite a right place for my problem, but you need to wait uncertain amount of time for registration on the official derelict forum, so I decided to start here.

import derelict.sfml2.window;
import derelict.sfml2.system;

import std.file;

void main() {

    version(Posix) {
        string SFML2_window = "lib/libcsfml-window.so";
    }

    assert(SFML2_window.isFile);

    DerelictSFML2Window.load(SFML2_window);

}

After running this program I surprisingly get:

--Failed to load one or more shared libraries:
	lib/libcsfml-window.so - libsfml-window.so.2: cannot open shared object file: No such file or directory

Needless to say, I DO have this directory and file in proper place with other .so files from SFML library. But I'm new to deal with dynamic shared libs, so maybe I miss something.
November 03, 2012
On Friday, 2 November 2012 at 18:33:39 UTC, Andrey wrote:
> I know this isn't quite a right place for my problem, but you need to wait uncertain amount of time for registration on the official derelict forum, so I decided to start here.

Sorry. That's a problem with DSource. The maintainer hasn't been around in a long while. I'll have to look into moving the Derelict forums somewhere else, probably to my own server, when I have a chance.

>
> import derelict.sfml2.window;
> import derelict.sfml2.system;
>
> import std.file;
>
> void main() {
>
>     version(Posix) {
>         string SFML2_window = "lib/libcsfml-window.so";
>     }
>
>     assert(SFML2_window.isFile);
>
>     DerelictSFML2Window.load(SFML2_window);
>
> }
>
> After running this program I surprisingly get:
>
> --Failed to load one or more shared libraries:
> 	lib/libcsfml-window.so - libsfml-window.so.2: cannot open shared object file: No such file or directory
>
> Needless to say, I DO have this directory and file in proper place with other .so files from SFML library. But I'm new to deal with dynamic shared libs, so maybe I miss something.

Not sure what's going on here. In the error message, the part before the '-' indicates that Derelict is attempting to load the library name you told it to. But the part after the '-' is the message reported by the system, and that indicates the system is looking for a different file name (and, oddly, an SFML file rather than CSFML). Is lib/libcsfml-window.so by chance a symlink?

My Linux box is not immediately available and I am swamped with my new business, so I'm afraid I'll be rather useless in helping you figure this out.

November 03, 2012
I don't really understand where does that "libsfml-window.so.2" string come from. The file is 100% fully fledget .so shared library, not a symlink.

Maybe it tries to follow default system (env) path instead of checking local lib dir.

:-(
November 04, 2012
Le vendredi 02 novembre 2012 à 19:33 +0100, Andrey a écrit :
> I know this isn't quite a right place for my problem, but you need to wait uncertain amount of time for registration on the official derelict forum, so I decided to start here.

you can open an issuer from github to discuss about your problem -> https://github.com/aldacron/Derelict3/issues