ADMB Building Source for Unix

Released March 15, 2024

Describe building ADMB from source for Unix.


The following tools should be installed on the local computer.

  • C++ compiler

    For Unix,

    • GNU C++

    For MacOS,

    • Apple Clang
  • GNU make
  • GNU stream editor (sed)
  • GNU flex
  • Optional — Git client to download from version control.

Note — For MacOS, install XCode with command line tools which includes all the prerequisites.

Building Source

  1. Download

    Download ADMB source distribution

    Open a Terminal window

    Use the command below to extract contents of zip file to ~/admb/.

    [~]$ unzip

    Alternative — Use Git client (see command below) to get source from version control repository.

    [~]$ git clone

    This will download latest source repository to ~/admb/.

  2. Build

    Change to admb directory.

    [~]$ cd admb

    To build ADMB, use the commands below.

    [~/admb/]$ make

    Note — When the build is completed, ~/admb/build/admb/ is the binary distribution directory.

  3. Test

    In the Terminal window, use the command below to build and run the simple example.

    Build examples

    [~/admb/]$ make --directory=examples all
  4. Optional — Multi-User Installation

    Installs binary distribution folder to /usr/local/ as super-user.

    [~/admb/]$ sudo make install

    Build and run the simple example without the directory prefix.

    [~/admb/]$ cd examples/admb/simple
    [~/admb/examples/admb/simple/]$ admb simple.tpl
    [~/admb/examples/admb/simple/]$ ./simple

    If unable to build simple example, then use the Manual Installation below.

    Alternative — Manual Installation

    Copy binary distribution folder to /usr/local/ as super-user.

    [~/admb/]$ sudo cp -Rvf build/dist /usr/local/admb

    Note — The dist folder can be copied to other computers with similar configurations.

    Create symlink to main admb script. Directory /usr/local/bin/ should already exist.

    [~/admb/]$ sudo ln -sf /usr/local/admb/admb /usr/local/bin/admb

    Read manuals for more information.


For help and support, please post on the ADMB Discussions.

ADMB Foundation © 2007–2024