This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Compiling: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
New page: ==Overview== ==Source Code== ==Compilers== ===GCC=== ===XCode=== ===Visual C++=== Category:Development Category:Compiling
 
Zehra (talk | contribs)
we got official documentation covering it
 
(42 intermediate revisions by 15 users not shown)
Line 1: Line 1:
==Overview==
BZFlag is well supported on 3 major operating systems. (Please consult with other platform specific readme's, if available, otherwise consult general build instructions.)


==Source Code==
{|{{Prettytable}}
|-
| {{Hl3}} |'''Operating System:'''
|-
| [https://www.bzflag.org/documentation/developer/compiling/windows/ Windows]
|-
| [https://www.bzflag.org/documentation/developer/compiling/linux/ Linux]
|-
| [https://www.bzflag.org/documentation/developer/compiling/macos/ macOS]
|-
|}


==Compilers==
=Compiling Misc:=
==Simple plugin compiling==
Simple bash script which can sometimes simplify writing very basic plugins.


===GCC===
'''plugin.sh'''
#!/bin/bash
compiler="g++"
options="-I "
headers="/path/to/bzflag/include"
options2="-fPIC -shared -o"
$compiler $options $headers $options2 $1.so $1.cpp
Compile a plugin with:
./plugin.sh myPlugin.cpp


===XCode===
==Simple [[Modeltool|modeltool]] compiling==
 
This usual covers building modeltool on recent releases:
===Visual C++===
g++ -o modeltool modeltool.cxx -include SimpleTextUtils.h model.h wavefrontOBJ.h Q3BSP.h Q3BSP.cxx wavefrontOBJ.cxx SimpleTextUtils.cxx




[[Category:Development]]
[[Category:Development]]
[[Category:Compiling]]
[[Category:Compiling]]
[[Category:Tutorials]]

Latest revision as of 02:07, 10 November 2025

BZFlag is well supported on 3 major operating systems. (Please consult with other platform specific readme's, if available, otherwise consult general build instructions.)

Operating System:
Windows
Linux
macOS

Compiling Misc:

Simple plugin compiling

Simple bash script which can sometimes simplify writing very basic plugins.

plugin.sh

#!/bin/bash
compiler="g++"
options="-I "
headers="/path/to/bzflag/include"
options2="-fPIC -shared -o"
$compiler $options $headers $options2 $1.so $1.cpp

Compile a plugin with:

./plugin.sh myPlugin.cpp

Simple modeltool compiling

This usual covers building modeltool on recent releases:

g++ -o modeltool modeltool.cxx -include SimpleTextUtils.h model.h wavefrontOBJ.h Q3BSP.h Q3BSP.cxx wavefrontOBJ.cxx SimpleTextUtils.cxx