gecko0307 / dagon

3D game engine for D
https://gecko0307.github.io/dagon
Other
332 stars 30 forks source link

Trying to run samples on x64 Linux results in "wrong ELF class: ELFCLASS32" #2

Closed roobie closed 7 years ago

roobie commented 7 years ago

I'm working on a PR to solve this.

Full error message for reference:

Building package dagon:simple in ~/devel/dagon/
Performing "debug" build using dmd for x86_64.
dlib 0.10.0: target for configuration "library" is up to date.
dagon:simple 0.0.2: building configuration "application"...
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Running ./dagon_simple 
Allocated memory at start: 0
derelict.util.exception.SharedLibLoadException@src/derelict/util/exception.d(43): Failed to load one or more shared libraries:
    lib/libSDL2-2.0.so - lib/libSDL2-2.0.so: wrong ELF class: ELFCLASS32
----------------
??:? void derelict.util.exception.SharedLibLoadException.throwNew(const(char[][]), const(char[][])) [0xcb493062]
??:? void derelict.util.sharedlib.SharedLib.load(immutable(char)[][]) [0xcb493d3e]
??:? void derelict.util.loader.SharedLibLoader.load(immutable(char)[][]) [0xcb4936ae]
??:? void derelict.util.loader.SharedLibLoader.load(immutable(char)[]) [0xcb493637]
??:? dagon.core.application.Application dagon.core.application.Application.__ctor(uint, uint, immutable(char)[], immutable(char)[][]) [0xcb3f8258]
??:? dagon.resource.scene.SceneApplication dagon.resource.scene.SceneApplication.__ctor(uint, uint, immutable(char)[], immutable(char)[][]) [0xcb439e61]
??:? main.MyApplication main.MyApplication.__ctor(immutable(char)[][]) [0xcb3f49f1]
??:? main.MyApplication std.conv.emplace!(main.MyApplication, immutable(char)[][]).emplace(void[], ref immutable(char)[][]) [0xcb4794e9]
??:? main.MyApplication dlib.core.memory.allocate!(main.MyApplication, immutable(char)[][]).allocate(immutable(char)[][]) [0xcb4275fe]
??:? _Dmain [0xcb3f4a98]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0xcb4d5447]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0xcb4d536f]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0xcb4d53ec]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0xcb4d536f]
??:? _d_run_main [0xcb4d52db]
??:? main [0xcb3f8049]
??:? __libc_start_main [0x32c352b0]
Program exited with code 1
gecko0307 commented 7 years ago

If included libraries are not working, you can delete the lib folder, and it will try to load system ones.