-
Notifications
You must be signed in to change notification settings - Fork 4
/
INSTALL
147 lines (105 loc) · 4.41 KB
/
INSTALL
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Please be sure to have CMake v3.15+ and a C++17-capable compiler.
============
On GNU/Linux:
You have two options: using the script or doing a manual installation
1. Using the build.sh script
To compile and install the release version:
$> ./build.sh
You can also compile and install GHOST with different options:
$> ./build.sh debug
$> ./build.sh debug_no_asan
$> ./build.sh rel_dbg_info
$> ./build.sh tests
$> ./build.sh tutorial
respectively to compile and install the debug version of GHOST, the
debug version without the address sanitizer flag, the release version
with debug info, the Google unit tests, and source code of tutorials.
If it is the first time you compile and install GHOST on your
GNU/Linux machine, type the command
$> sudo ldconfig
to create necessary links and cache to GHOST's shared library.
2. Manual installation
To compile in release mode, just type:
$> mkdir release
$> cd release
$> cmake -DCMAKE_BUILD_TYPE=Release ..
$> make
Install the library and the header files with:
$> sudo make install
Finally, if it is the first time you compile and install GHOST on your
GNU/Linux machine, type the command
$> sudo ldconfig
to create necessary links and cache to GHOST's shared library.
============
On OSX:
Same as on GNU/Linux, except that the command to create links and
cache on OSX is:
$> sudo update_dyld_shared_cache
============
On Windows:
You have two options: using the script or doing a manual installation
1. Using the build.bat script
To compile and install the 32bit and 64bit release versions, go to the
GHOST directory in a command prompt and type:
$> build.bat
This script is set to build GHOST with Visual Studio 17 2022. You can
either modify the script or do a manual installation if you do not want
using Visual Studio 17 2022.
The script will first ask you to enter the install path for GHOST headers
and libraries. Just press ENTER to install GHOST to the default path
(C:\Users\Public\Documents\ghost)
Then it will compile the release version of both the 32bit library
(installed in the 'ghost\lib32' folder) and the 64bit library (installed
in the 'ghost\lib' folder). Headers are installed in the 'ghost\include'
folder.
2. Manual installation
Go to the GHOST directory in a command prompt and type the following
commands:
Prepare the builds (change "Visual Studio 17 2022" if you want to use
another compiler)
$> cmake -G "Visual Studio 17 2022" -A Win32 -B "build32" -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL
$> cmake -G "Visual Studio 17 2022" -A x64 -B "build64" -D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
Build both projects.
$> cmake --build build32 --config Release
$> cmake --build build64 --config Release
Install both 32bit and 64bit libraries to the default install path
$> cmake --install build32
$> cmake --install build64
If you want to install the libraries to a specific install path, type:
$> cmake --install build32 --prefix your_install_path
$> cmake --install build64 --prefix your_install_path
The 32bit library will be installed in the 'ghost\lib32' folder, and the
64bit library in the 'ghost\lib' folder, and headers will be placed in
the 'ghost\include' folder.
============
On all OS:
Both the dynamic and static version of the library can be found in the
lib directory of this current folder.
============
Troubleshooting:
===
Got the error 'The compiler /usr/bin/c++ has no C++17 support. Please
use a different C++ compiler.'?
1. Make sure you have installed a C++17-capable compiler
2. If you have such a compiler but still get the error, before typing
the command 'cmake ..', type 'export
CXX=/path/of/your/c++17/compiler/executable_name'
===
If you have the following warning:
'randutils.hpp:444:19: warning: mangled name for ‘static uint32_t
randutils::auto_seeded<SeedSeq>::hash(T&&) [with T = void (*)(int)
throw (); SeedSeq = randutils::seed_seq_fe<8, unsigned int>]’ will
change in C++17 because the exception specification is part of a
function type [-Wnoexcept-type] static uint32_t hash(T&& value)'
Don't worry, everything is fine: having this warning won't hurt GHOST
correctness/performances/security. To get rid of this warning, use GCC
8.3.0 or above.
===
While running your program on GNU/Linux or on OSX, if you have a
message like 'error while loading shared libraries: libghost.so:
cannot open shared object file: No such file or directory', you
probably need to run the following command:
On GNU/Linux:
$ sudo ldconfig
On OSX:
$> sudo update_dyld_shared_cache