File: README.md

package info (click to toggle)
libtcod 1.18.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,464 kB
  • sloc: ansic: 48,535; cpp: 11,905; python: 4,840; makefile: 44; sh: 25
file content (58 lines) | stat: -rw-r--r-- 2,078 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Building Libtcod using Autotools
================================
# Dependencies #

For Ubuntu 16.04, install these dependencies from the command line:

    sudo apt install build-essential autoconf automake libtool git libsdl2-dev

For Fedora 22, run these commands:

    sudo dnf -v groupinstall "C Development Tools and Libraries"
    sudo dnf install alsa-lib-devel audiofile-devel mesa-libGL-devel mesa-libGLU-devel mesa-libEGL-devel mesa-libGLES-devel libXext-devel libX11-devel libXi-devel libXrandr-devel libXrender-devel dbus-devel libXScrnSaver-devel libusb-devel pulseaudio-libs-devel libXinerama-devel libXcursor-devel systemd-devel

MacOS users with a working Homebrew installation, can install the necessary
dependencies with `brew install autoconf automake libtool pkg-build sdl2`.

# Building SDL2 #

It is recommended strongly that you install SDL2 using your package manager.
However, if you are unable to work out the package name, then you can take the
harder route and build it yourself.

https://wiki.libsdl.org/Installation

# Building Libtcod #

Download the latest libtcod version, build it, and install it with the
following commands:

    git clone https://github.com/libtcod/libtcod.git
    cd libtcod/buildsys/autotools
    autoreconf -i
    ./configure
    make
    sudo make install

This will place libtcod static and shared libraries in the `/usr/local/lib`
directory, and header files in the `/usr/local/include/libtcod` directory.

You should consider adding the `/usr/local` directories to PKG_CONFIG_PATH and
LD_LIBRARY_PATH if you haven't already done so:

    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    export LD_LIBRARY_PATH=/usr/local/lib

Now you can get the necessary compile flags for a libtcod project
with `pkg-config libtcod`, for example:

    gcc hello.c `pkg-config libtcod --cflags --libs`

# Troubleshooting #

`./configure` may fail to find `Makefile.in` and `autoreconf -i` will have the
following error:

    error: Libtool library used but 'LIBTOOL' is undefined

This means that libtools has not been installed.