• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Solved compile with -O2 or -g

Calon

Experienced Member
Joined
Feb 6, 2009
Messages
1,070
Reaction score
21
Hello, do i knw what is difference between compile with -O2 or -g ? what are those mean ? i think there
's also -O3 cant get it
 
You must tell us what compiler you use because they are different flags for different compilers. Since -Ox format is usually for gcc here is what they mean(for gcc)

-O1, Oo, O3, Ox are all optimization levels they can make your server a bit faster in certain conditions or executable smaller.
-g is just for compiling with debugging information.

Also, it would be great if you read the manual of gcc
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
 
Back
Top