What's new

Welcome to Onforum.net - Web and gaming resource community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

Tutorial Compile source without requiring external dependencies

Blaze

Well-known member
Joined
Jan 28, 2019
Messages
217
Reaction score
1,241
Points
93
Credits
18
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.
 
shape1
shape2
shape3
shape4
shape7
shape8
Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

Thank you for understanding!