Seite 1 von 1

ogre programm startet nicht

Verfasst: 25.03.2024 19:35
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?

Re: ogre programm startet nicht

Verfasst: 25.03.2024 21:12
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

Re: ogre programm startet nicht

Verfasst: 26.03.2024 06:15
von xperience2003
@mk-soft

cool, danke
es funktioniert ;)