Skip to content

Game does not compile on Linux out of the box for several reasons #4

@Arcanister

Description

@Arcanister

First of all, you hardcode "g++-5" in game/sdl/linux/makefile
To continue compilation I had to remove -5 from several places on top of the make file so that executable is just "g++".

Then build has stopped because of missing #include <stdio.h> in several files:
game/httppackinfomanager.cpp with error: 'fopen' was not declared in this scope
game/httppackmanager.cpp:54:51: error: 'fopen' was not declared in this scope
mpshared/packinfomanager.cpp:43:54: error: 'fopen' was not declared in this scope
mpshared/indexloader.cpp:12:38: error: 'fopen' was not declared in this scope

Next problem was:

../../gameform.cpp:4:30: fatal error: game/Multiplayer.h: No such file or directory
compilation terminated.
../../Multiplayer.cpp:2:30: fatal error: game/Multiplayer.h: No such file or directory
compilation terminated.
In fact this file does not exist, however file game/multiplayer.h does. So changing this two files to multiplayer.h did work.

After those five files the game compile successfully.

Another problem is with file game/sdl/linux/install.sh
It uses if ! dpkg -l | grep libsdl2-dev > /dev/null ; then
This line which would only work in distributions based on deb packages, such as Debian and Ubuntu but not in other distributions. I think it's better to say that SDL2 is required for building and recommend to install this two packages: libsdl2-dev libcurl4-openssl-dev in your readme file

(though in my distribution -dev packages are not separated from main packages)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions