Mode8fx / Trogdor-Reburninated

A fan-made recreation of Trogdor for PC and consoles
MIT License
18 stars 8 forks source link

SDL.h: No such file or directory #3

Closed korbosoft closed 7 months ago

korbosoft commented 1 year ago

when running make on linux, it seems to not be able to find SDL.

[  7%] Building CXX object CMakeFiles/trogdorrb.dir/src/main.cpp.o
In file included from /home/korbo/test/Trogdor-Reburninated/Trogdor-Reburninated/src/main.h:1,
                 from /home/korbo/test/Trogdor-Reburninated/Trogdor-Reburninated/src/main.cpp:1:
/home/korbo/test/Trogdor-Reburninated/Trogdor-Reburninated/src/include.h:19:10:fatal error: SDL.h: No such file or directory
   19 | #include <SDL.h>
      |          ^~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/trogdorrb.dir/build.make:76: CMakeFiles/trogdorrb.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/trogdorrb.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Mode8fx commented 11 months ago

I updated the CMakeLists to support Linux. It compiles, but I haven't tested the output since I don't know how to handle the dependencies. If you want to take a crack at improving the CMakeLists or figuring out what needs to be packaged with it, here's a Linux build. Depending on what libraries you already have installed, this build might work as-is. Trogdor-Reburninated-v2.0-linux-WIP.zip

If it helps, here's the output when I run objdump -p ./trogdorrb | grep NEEDED:

  NEEDED               libSDL2_image-2.0.so.0
  NEEDED               libSDL2_mixer-2.0.so.0
  NEEDED               libSDL2_ttf-2.0.so.0
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6

I've tried including those in a lib folder (or in the case of symlinks, copying+renaming what they originally linked to) and running via LD_LIBRARY_PATH=./lib ./trogdorrb, but it keeps asking for more dependencies.

Mode8fx commented 7 months ago

Closing this issue since there is now a proper Linux makefile that I've confirmed works.