CompilingNativeMods

From Oldunreal-Wiki
Jump to navigation Jump to search

To compile native Linux mods you have to use the following options in CodeBlocks:

Compiler defines:

_REENTRANT
__LINUX_X86__
__LINUX__
DO_RYANS_HACKY_GUARD_BLOCKS
UTGLR_UNREAL_227_BUILD
UNICODE

Additional compiler settings:

-fsigned-char
-fno-strict-aliasing
-fno-for-scope
-fno-toplevel-reorder
-Wno-reorder
-Wno-write-strings
-fno-tree-dominator-opts
-fno-tree-dse
-fno-tree-fre
-fno-tree-pre
-fno-gcse
-fno-cse-follow-jumps
-ffast-math
-m32

Linker settings:

-Wl,-rpath,.
-m32

You may also need to redefine a compiler for the project if you are using the Public Headers as a base for your own project; the standard GCC is appropriate.

Keep in mind that for 227i the GCC compiler is 4.3, and 227j will be using 4.7