TomenetGame / tomenet

TomeNET is an online multiplayer roguelike role-playing game
https://www.tomenet.eu/
Other
69 stars 11 forks source link

Problems Compiling under Ubuntu64 #5

Closed Andres6936 closed 4 years ago

Andres6936 commented 4 years ago

Command:

cd src && make

Error:

gcc -O2 -g -pipe -Wall -DUSE_X11 -DUSE_GCU -I/usr/X11R6/include -D_XOPEN_SOURCE -D_BSD_SOURCE -DMEXP=19937 -std=c99 -DSOUND_SDL `sdl-config --cflags` -D_DEFAULT_SOURCE -DACC32 -fPIC -Wno-format-truncation  -Iserver -Iserver/lua -o client/snd-sdl.o -c client/snd-sdl.c
client/snd-sdl.c:51:10: fatal error: SDL_mixer.h: No such file or directory
   51 | #include "SDL_mixer.h"
      |          ^~~~~~~~~~~~~
compilation terminated.
makefile:472: recipe for target 'client/snd-sdl.o' failed
make: *** [client/snd-sdl.o] Error 1
make: *** Waiting for unfinished jobs....

Suggestions:

Use:

The problems originate from the fact that the headers of SDL and SDL2 are usually found in /usr/local/include/SDL or /usr/include/SDL.

#include "SDL/SDL_mixer.h"
Andres6936 commented 4 years ago

I have compiled the program by doing the following:

I modified the Makefile to remove the -DSOUND_SDL definition and the link to -lSDL_mixer

jezek commented 4 years ago

Have you tried to install, sdl mixer developer package?

For me on Ubuntu 19.10 worked:

$ sudo apt install libsdl1.2-dev libsdl-mixer1.2-dev  

And I didn't have to do additional changes to compile.

Andres6936 commented 4 years ago

@jezek thanks very much. Your suggestion worked correctly.

jezek commented 4 years ago

@Andres6936 The suggestion above is the bare minimum for compile (I think). Maybe you want to install some more packages for full sound support. Please read the Linux (compiling from source): section in Installation & setup docs.