Tutorial Compile source without requiring external dependencies

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Blaze

Elite
Elite
VIP
Joined
Jan 28, 2019
Messages
507
Credits
635
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:
Expand Collapse Copy
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:
Expand Collapse Copy
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.
 
Back
Top