Page 1 of 1
Engine3d.so problem with compiled executables.
Posted: Tue Feb 10, 2009 10:25 pm
by EdzUp[SD]
I have created an executable of my Elite Multiplayer project this works 100% fine in the ide not a problem at all. When I create an executable for it in the same directory as the source files (complete with Engine3d.so) it cannot initialise the 3d engine.
Anyone have any idea why this is, my computer is:
AMD Athlon 64 3400
1.25Gb ram
Ubuntu Linux 8.10 (all updated)
ATI Radeon Sapphire HD2600 (512Mb)
PureBasic 4.3
It happens with all 3d executables.
Posted: Wed Feb 11, 2009 3:05 pm
by DarkDragon
How do you start the executable? Through terminal or through a filebrowser? Those filebrowsers often don't run the executables within their directory.
Try the following on a terminal:
Code: Select all
cd /path/to/your/exec/
./theexecutablefile
Posted: Wed Feb 11, 2009 5:21 pm
by EdzUp[SD]
apparently its missing the .so file, but the help documentation for PB tells you to copy the Engine3d file to the application directory
Posted: Wed Feb 11, 2009 9:52 pm
by Anonymous
Put Engine3D.so in usr/lib ?
Posted: Thu Feb 12, 2009 10:22 am
by DarkDragon
EdzUp[SD] wrote:apparently its missing the .so file, but the help documentation for PB tells you to copy the Engine3d file to the application directory
The documentation says many things if the day is long (And here its only the half truth, because the current directory often is the executable directory). Try it the way I told you.
Or try it with this at the first line of your code:
Code: Select all
SetCurrentDirectory(GetPathPart(ProgramFilename()))
Posted: Thu Feb 12, 2009 8:14 pm
by EdzUp[SD]
Cpl.Bator:trying to get it to work like the docs say to, I have a feeling your right tho that I will in the end have bite the bullet.
DarkDragon: Done the path command still nothing, even added the last minute adjustment to InitEngine3d( "./engine3d.so" )... still nothing.
Posted: Sat Feb 14, 2009 12:33 am
by walker
initEngine3D() accepts an argument... the path to the engine3d.so ..
i.E
Code: Select all
InitEngine3D("/home/username/yourapp/engine3.so")
this should do the trick
and AFAIK only an absolute path works atm ... so that's maybe the bug ...
Posted: Sat Feb 14, 2009 12:39 am
by Fred
linux uses LD_LIBRARY_PATH env var to search the shared libs. So you have to put your path in it (or '.').
Posted: Sat Feb 14, 2009 10:57 am
by EdzUp[SD]
I used
Also /home/edzup/Programming/purebasic/projects/Elite_Multiplayer/
Still causes an error that it cant find engine3d.so, yes ive even tried changing to the application directory, still nothing.
Posted: Sun Feb 15, 2009 5:45 pm
by Fred
try to put "export LD_LIBRARY_PATH=." in your bash before launching your program.
Posted: Sun Feb 15, 2009 9:57 pm
by EdzUp[SD]
will try it