Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

These are instructions for compiling GMAT on Mac OS X as a 32-bit application, using command-line tools. Please note that GMAT is not rigorously tested on this platform. If you find bugs, please submit them to JIRA!


There is a known issue with building wxMac 2.8.12 with Xcode 4.4 due to the lack of the Snow Leopard (OSX 10.6) SDK. One workaround is to install a previous version of Xcode, or to manually copy MacOSX10.6.sdk from a previous version of Xcode to your system. Previous versions of Xcode can be downloaded from Apple (external link). See this report (external link) for additional details.

Get the code

Follow the instructions on the Downloads page to check out a copy of the GMAT source code from SourceForge.

We'll refer to the SourceForge checkout as sf.

Get the prerequisites


You'll need the standard GNU toolchain, including GCC and make. The easiest way to do this on Mac is to install XCode (4.3 or earlier) from the Mac App Store.


GMAT needs a version of wxWidgets with OpenGL enabled and Unicode disabled. This usually means building a custom wxMac library:

  1. Download wxMac 2.8.12 from
  2. Unzip and untar the downloaded file.
  3. In a Terminal, run the following commands from the new wxMac-2.8.12 directory (replacing /path/to/wxMac-2.8.12 with the absolute path to your wxMac-2.8.12 directory):
    mkdir build-gmat
    cd build-gmat
    arch_flags="-arch i386"
    ../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --prefix=/path/to/wxMac-2.8.12/build-gmat --with-opengl
  4. Run make to compile the wxMac libraries:
  5. Run make install to install the libraries and correctly set install paths.   (This may not be required in the near future.)
    make install


  1. Download
  2. Uncompress and untar cspice.tar.Z to result in a cspice directory.


  1. Download from internal repository (internal users only)
  2. Unzip and move the f2c32 directory to your preferred location.


  1. Download PCRE from
  2. Unzip and untar the downloaded file
  3. Run the following commands from the extracted pcre-#.## folder:

Configure GMAT

  1. Set the following environment variable:
  2. Copy sf/trunk/build/macosx/ to sf/src
  3. Edit to set the following variables:
    TOP_DIR: path to the sf directory
    WX_INSTALLED: path to the directory containing wx-config; usually this is the wxMac-2.8.12/build-gmat directory
    WX_LIB_LOC: path to the directory containing the compiled wx libraries; usually this is the wxMac-2.8.12/build-gmat/lib directory
    SPICE_DIR: path to the directory containing the cspice directory
    F2C_LOC: path to the directory containing the f2c32 directory
    PCRE_LIB_LOC: path to the PCRE library location; usually pcre-#.##/.libs

Configure the bundled plugins

The public GMAT repository (on SourceForge) includes several plugins that can be compiled along with the main application.

MatlabInterfacePlugin (not currently available)

The MatlabInterfacePlugin is available on OS X Leopard (10.5) and Snow Leopard (10.6) only.

  1. Copy sf/plugins/MatlabInterfacePlugin/build/mac_snowleopard/ (or mac_leopard) to sf/plugins/MatlabInterfacePlugin/src.
  2. Edit the new sf/plugins/MatlabInterfacePlugin/src/ file:
    WX_INSTALLED: path to the directory containing wx-config; usually this is the wxMac-2.8.12 directory
    MATLAB_DIR: path to a MATLAB app (such as /Applications/

Plugin configuration: To use the MATLAB interface plugin, you must have the following environment variable configured:
You can do this system-wide by putting the variable and its value into the file ~/.MacOSX/environment.plist using the OS X Property List Editor. See Apple QA1067 for details. You'll need to log off and log back on before the setting will take effect. (this does not work in later versions of OS X)

CInterfacePlugin (alpha)

Copy sf/plugins/CInterfacePlugin/build/macosx/ to sf/plugins/CInterfacePlugin/src. No extra configuration of this file is necessary.

EphemPropagatorPlugin (alpha)

  1. Copy sf/plugins/EphemPropagatorPlugin/build/macosx/ to sf/plugins/EphemPropagatorPlugin/src.
  2. Edit the new sf/plugins/EphemPropagatorPlugin/src/ file:
    SPICE_DIR: path to the directory containing cspice

EstimationPlugin (alpha)

Copy sf/plugins/EstimationPlugin/build/macosx/ to sf/plugins/EstimationPlugin/src. No extra configuration of this file is necessary.

EventLocatorPlugin (alpha)

Copy sf/plugins/EventLocatorPlugin/build/macosx/ to sf/plugins/EventLocatorPlugin/src. No extra configuration of this file is necessary.

ExtraPropagatorsPlugin (alpha)

  1. Copy sf/plugins/ExtraPropagatorsPlugin/build/macosx/ to sf/plugins/ExtraPropagatorsPlugin/src.
  2. Edit the new sf/plugins/ExtraPropagatorsPlugin/src/ file:
    GMAT_CODE_LOCATION: path to sf/src
    GMAT_BIN_LOCATION: path to sf/application/bin


The FminconOptimizerPlugin is not available on Mac OS X.

Build GMAT

  1. Change to the top-level sf directory
  2. Run make

Configure and build the internal plugins

available internally only