Page 1 of 1

[Linux -x86] Engine3d.so question?

Posted: Tue Feb 10, 2009 8:08 pm
by EdzUp[SD]
I have written a test app for my Elite Multiplayer project and the problem I have is in the IDE the application compiles perfectly but when I 'Create Executable' and put the exe and files in a folder on the desktop with the Engine3d.so file from the compiler directory in PB it wont start the engine I get the usual initialisation error message.

Anyone else had this problem?

Posted: Wed Feb 11, 2009 10:12 am
by Mahan
That's because Linux uses an environment variable called "LD_LIBRARY" instead of the normal path variable to know where to find it's .so-files.

On Windows the path and the library-path are all the same.

Besides on windows there is a build-in convention about "path-variable or current program path", i.e. it always is enough to have referenced files in the same folder on windows, while that is not the case on unix/linux (mainly for security reasons).

Posted: Wed Feb 11, 2009 10:35 am
by EdzUp[SD]
ok another big plus for being able to 'compile' a single executable without external files :(

Posted: Wed Feb 11, 2009 11:30 am
by Mahan
http://www.purebasic.fr/english/viewtop ... ibrarypath
http://www.purebasic.fr/english/viewtop ... ibrarypath

Note: Seems the environment variable is LD_LIBRARY_PATH

On a sidenote it seems you should be able to load a shared library in the same folder you are in if you prefix it with "./" i.e. "./Engine3d.so"
ok another big plus for being able to 'compile' a single executable without external files
Well it works most of the time, but not with the 3D engine.