blob: 8e588d3675c96e40ef191ac2f74772ae4522c613 (
plain)
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
|
=== compile - unix / linux ===
compile enet:
$ wget http://enet.bespin.org/download/enet-1.3.1.tar.gz
$ tar xfz enet-1.3.1.tar.gz
$ mv enet-1.3.1 enet
$ cd enet
$ ./configure --disable-shared
$ make -j2
compile pacman using qmake (or rebuild.sh)
$ ./rebuild.sh
=== compile - windows ===
compile enet:
- download and extract http://enet.bespin.org/download/enet-1.3.1.tar.gz to pacman directory
- rename enet-1.3.1 to enet
- open cmd and cd to that directory
- use (mingw-)gcc (the same qt sdk is using) and compile enet
you can either use mingw + configure or compile enet on your own using commandline method below
compile enet - commandline method:
- you will need to expand %PATH% before mingw tools are usable (set PATH=/path/to/mingw;%PATH%)
- execute do this for every *.c-file replacing $file with the filename:
$ gcc -DWIN32 -I. -Iinclude -g -O2 -c -o $file.o $file.c
e.g: gcc -DWIN32 -I. -Iinclude -g -O2 -c -o host.o host.c
- execute the following command to create a dll:
$ gcc -shared -o .libs/libenet.dll *.o -lws2_32 -lwinmm
- OPTIONAL: _instead_ of creating dll you can also create an archive and link against that
please note that you also _need to enable_ to link against ws2_32 and winmm in
the file common.pri (the part is currently commented)
$ ar cru .libs/libenet.a *.o
$ ranlib .libs/libenet.a
compile pacman using qmake or qt creator
|