What's new

Tutorial Compile source without requiring external dependencies

Blaze

Active member
Many of you will have noticed that by compiling the source locally and then moving it to your server you receive error messages that relate to dependencies not found when trying to start the files.
For example:
Code:
Shared object "libmd.so.5" not found, required by "game"
To avoid going crazy trying to solve dependencies, we can simply include the necessary libraries directly in the game file.
To do this you need to edit the file called "Makefile" and add "-static" to the CFLAGS as shown below.
Code:
CFLAGS = -m32 -g -w -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -static
The result will be that the compiled files already contain all the dependencies necessary for their operation and will be slightly heavier.
 
Top