Building ADMB from source
Download ADMB source files
Thre are two ways to get the ADMB source files.
- Download the source distribution from the downloads section.
OR
- Checkout the source files from the version control repository. See the checkout instructions from the project page.
Building for Borland 5.5 (Windows)
-
Download and install Borland 5.5 free compiler.
- Follow the set-up instructions and choose the default installation path C:\Borland\BCC55 .
-
Download and install GnuWin32 Flex.
-
Download and install GnuWin32 Make.
-
Download and install GnuWin32 Coreutils.
-
Download and install MinGW.
-
Download and install Cygwin.
-
Add installed tools from above to the system path. Click the Command Prompt located in Start->All Programs->Accessories, the type in the following commands
set PATH=%ProgramFiles%\GnuWin32\bin;c:\MinGW\bin;%PATH% set PATH=c:\cygwin\bin;c:\Borland\BCC55\bin;%PATH% cd admb-trunk make bccWhen done, the built distribution folder will be in admb-trunk\build\dists\admb_b502_win32 .
Building for Visual C++ (Windows)
- Download and install the Microsoft Visual C++ Express.
-
Download and install GnuWin32 Flex.
-
Download and install GnuWin32 Make.
-
Download and install GnuWin32 Coreutils.
- Open a Visual Studio Command Prompt.
- For Visual C++ 2010 Express Edition, click Visual Studio Command Prompt(2010) located in Start->All Programs->Microsoft Visual Studio 2010->Visual Studio Tools.
- For Visual C++ 2008 Express Edition, click Visual Studio 2008 Command Prompt located in Start->All Programs->Microsoft Visual C++ 2008 Express Edition->Visual Studio Tools.
- For Visual C++ 2005 Express Edition, click Visual Studio 2005 Command Prompt located in Start->All Programs->Visual C++ 2005 Express Edition->Visual Studio Tools.
- For Visual Studio .NET 2003, click Visual Studio .NET 2003 Command Prompt located in Start->All Programs->Microsoft Visual .NET 2003->Visual Studio .NET Tools.
- In the Visual Studio Command Prompt Window, Add GnuWin32 to the system PATH variable.
set PATH=%ProgramFiles%\GnuWin32\bin;%PATH% -
Build the libraries.
cd admb-trunk make vcWhen done, the built distribution folder will be in admb-trunk\build\dists\admb_vc9_win32 .
Building for GCC (all platforms)
- Build the libraries.
$ cd admb-trunk $ make linux - Test the built libraries.
$ make linux-verify
Developing for ADMB
For any code changes that will be committed to the ADMB version control should first checked. The procedure below is the steps that should be done prior to the committing changes to the version control repository.
- Create a benchmark file. This step should be done before any development begins. Follow the steps in "Building for GCC". It will create a benchmark-date.txt file where date is the current time the verify target was called. This file contains the final outputs from running the ADMB examples. The benchmark file will be used to check if any of the outputs were changed during development.
- Develop code. It is a good idea to keeping running $ make linux-verify for any change to the source code, then compare the benchmark file from that run to the initial benchmark file in step 1. If there are differences, they should be looked into why the difference occurred.
- Update the code. There will be changes committed by others to the repository while development is going on. Run the command below in the trunk folder to update the local copy.
$ svn update - Build and run verify target.
$ make linux $ make linux-verify - Commit changes to repository.
Message is a description of the changes that were committed. The format is "[Issue N] description" where N is the number from issue tracker and description.$ svn commit -m "message"
References
Read http://otter-rsch.ca/admbre/demo.html
Read http://otter-rsch.com/alldown.html

