ogre programm startet nicht

Für allgemeine Fragen zur Programmierung mit PureBasic.
xperience2003
Beiträge: 972
Registriert: 04.10.2004 18:42
Computerausstattung: Amiga, LinuxMint, Windows7
Wohnort: gotha
Kontaktdaten:

ogre programm startet nicht

Beitrag von xperience2003 »

hi,

habe ein kleines programm mit pb ogre unter linux gebastelt.

im editor läuft alles, wenn ich es kompiliere und auch
die engine.so ins programmverzeichniss lege, funktioniert es nicht.

die console gibt das aus:
'/home/hahner/GAMECODES/GUARDIAN-NG/guardian'
PB_LoadEngine3DLibrary(): engine3d.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
die *.so liegt im programmverzeichnis , wo muss die hin?
amiga rulez...
Rebirth Software
Benutzeravatar
mk-soft
Beiträge: 3844
Registriert: 24.11.2004 13:12
Wohnort: Germany

Re: ogre programm startet nicht

Beitrag von mk-soft »

Noch unter compiler option -> compile/run die executable im source directory erstellen

Oder

Code: Alles auswählen

CompilerIf #PB_Compiler_OS
  Macro CocoaString(NSString)
    PeekS(CocoaMessage(0, NSString, "UTF8String"), -1, #PB_UTF8)
  EndMacro
CompilerEndIf

Procedure.s GetProgramPath()
  CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
    Static bundlePath.s
    Protected bundlePathPtr
    
    If Not Bool(bundlePath)
      bundlePathPtr = CocoaMessage(0,CocoaMessage(0,0,"NSBundle mainBundle"),"bundlePath")
      If bundlePathPtr
        bundlePath = CocoaString(bundlePathPtr) + "/"
      EndIf
    EndIf
    ProcedureReturn bundlePath
  CompilerElse
    ProcedureReturn GetPathPart(ProgramFilename())  
  CompilerEndIf
EndProcedure

CompilerSelect #PB_Compiler_OS
  CompilerCase #PB_OS_Windows
    Global engine3d_path.s = GetProgramPath() + "engine3d.dll"
  CompilerCase #PB_OS_Linux
    Global engine3d_path.s = GetProgramPath() + "engine3d.so"
  CompilerCase #PB_OS_MacOS
    Global engine3d_path.s = GetProgramPath() + "Contents/Resources/engine3d.dylib"
CompilerEndSelect

Debug engine3d_path
If Not InitEngine3D(#PB_Engine3D_DebugLog, engine3d_path)
  MessageRequester("Error", "Engine3D not found!")
  End
EndIf
Alles ist möglich, fragt sich nur wie...
Projekte ThreadToGUI / EventDesigner V3 / OOP-BaseClass-Modul
Downloads auf MyWebspace / OneDrive
xperience2003
Beiträge: 972
Registriert: 04.10.2004 18:42
Computerausstattung: Amiga, LinuxMint, Windows7
Wohnort: gotha
Kontaktdaten:

Re: ogre programm startet nicht

Beitrag von xperience2003 »

@mk-soft

cool, danke
es funktioniert ;)
amiga rulez...
Rebirth Software
Antworten