[ADMB Users] ADMB installation

Skip to first unread message

Saang-Yoon Hyun

Feb 1, 2013, 8:20:37 PM2/1/13
to users
I used to use ADMB-IDE and now install the latest version of ADMB (11.0).   For the installation, I chose MinGW and Windows 7 (32 bit).  Following the install process for Windows GCC, I got the same results as those from "admb simple" and "simple" in Command Prompt window, so the installation seemed to be successful.  However, when I typed "admb" in a different folder (from c:\ADMB\examples\admb\simple?, then I got the following error message:
'admb' is not recognized as an internal or external command,
operable program or batch file.
Is this problem due to footprints from ADMB-IDE I used to use?   Importantly what should I do to correct it?    Thanks in advance.
Message has been deleted


Feb 1, 2013, 10:03:37 PM2/1/13
to admb-...@googlegroups.com, users, sh...@umassd.edu
Please ignore my message below.   At least in "ADMB-11 Command Prompt" window, it works!!! 

Ian Taylor - NOAA Federal

Feb 1, 2013, 10:16:52 PM2/1/13
to Saang-Yoon, users, Saang-Yoon Hyun, admb-...@googlegroups.com
Hi Saang-Yoon,
I'm glad you discovered that things were working.

If you want to use ADMB without opening the "ADMB-11 Command Prompt", there's some information on changing your PATH environmental variable in the MinGW installation instructions:

Users mailing list

Mark Maunder

Feb 2, 2013, 1:10:54 AM2/2/13
to Saang-Yoon Hyun, users


This directory has to be in the path

C:\Program Files (x86)\ADMB\bin


Feb 2, 2013, 6:46:44 PM2/2/13
to admb-...@googlegroups.com, users, Saang-Yoon Hyun
This inquiry is more about PATH (which is under System variables under Environment Variables).   Ian and Mark's responses were helpful, but I still failed to run admb in *any* DOS window (i.e., *any* Command Prompt). 
I installed the latest version of ADMB (11.0) with GCC (32bit) compiler.    It works only in the "ADMB-11 Command Prompt" window.   I put the latest version into the new folder say c:\ADMB    and the compiler into the new folder say c:\MinGW   
In order to run admb in *any* DOS window, I put the following into Path.
Then, "admb" command is recognized in *any* DOS window, (good in terms of some progress ...).  But when compiling the example, "simple.TPL", I get the following error message.
simple.cpp:1:21: fatal error: admodel.h: No such file or directory
compilation terminated.
What am I missing?  

Mark Maunder

Feb 2, 2013, 7:23:18 PM2/2/13
to Saang-Yoon, admb-...@googlegroups.com, users, Saang-Yoon Hyun

You have to put the include and library directories in the path as well


Feb 2, 2013, 8:01:08 PM2/2/13
to admb-...@googlegroups.com, users, Saang-Yoon, Saang-Yoon Hyun
Mark and others.
I added the following into the Path.
Then when compiling a TPL file (e.g., admb -r MMPT100), I have the following error message.

*** tpl2rem mmpt100
ADMB_HOME environment string is not set
Error: could not create mmpt100.cpp
Then, I create ADMB_HOME variable under "User variables" under "Environment Variables", giving its Value C:\ADMB.  That is,
But still I have the same error message.

Johnoel Ancheta

Feb 4, 2013, 2:41:29 PM2/4/13
to Saang-Yoon, ADMB Users
In the command prompt,

set ADMB_HOME=c:\admb

or set them in the system environmental variables.

On Fri, Feb 1, 2013 at 4:02 PM, Saang-Yoon <shy...@gmail.com> wrote:
My question below should have been elaborated.   I find that, under "ADMB-11 Command Prompt" window, compile and link (i.e., admb xxx.TPL) are successfully made!!!    However, they are not under an ordinary Command Prompt window.    In order to let compile and link be made in any Command Prompt window, what should I do?  

On Friday, February 1, 2013 8:20:37 PM UTC-5, Saang-Yoon Hyun wrote:


Feb 4, 2013, 6:05:10 PM2/4/13
to admb-...@googlegroups.com, ADMB Users, Saang-Yoon
Hi, Johnoel.
Thanks to your help below, I made some progress.   However, still I run into errors below [as opposed to successful compile/link in the" ADMB-11 Command Prompt (MinGW GCC-4.5.2)" window, where I was running a random effect model.] 
*** adcomp -r PT100
g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I. -I"c:\admb\include" -I"c:\admb\contrib" -o PT100.obj PT100.cpp
Error: could not create PT100.obj
'sed' is not recognized as an internal or external command,

operable program or batch file.

Error executing command  sed -e " " PT100.htp >>  classdef.tmp
Error executing command  sed -e " "  classdef.tmp > PT100.htp
Error executing command sed -n -f c:\admb\bin\seddf1b3 tfile2 >> PT100.htp
Error executing command sed -n -f c:\admb\bin\seddf1b4 tfile4 >> PT100.htp
Error executing command sed -f c:\admb\bin\seddf1b2 tfile2 >> PT100.htp
Error executing command sed -f c:\admb\bin\sedf1b2d tfile4 >> PT100.htp
Error executing command sed -f c:\admb\bin\sedf1b2a xxalloc3.tmp >> PT100.cpp
Error executing command sed -f c:\admb\bin\sedf1b2c xxalloc2.tmp >> PT100.cpp
Error trying to create output file PT100.cpp
PT100.cpp:398:1: error: stray '\32' in program
PT100.cpp:19:3: error: 'df1b2_parameters' does not name a type
PT100.cpp:20:40: error: invalid use of incomplete type 'struct model_parameters'
c:\admb\include/admodel.h:107:9: error: forward declaration of 'struct model_parameters'
Again thank you.


Feb 4, 2013, 7:12:07 PM2/4/13
to admb-...@googlegroups.com, ADMB Users, Saang-Yoon
Hi, Johnoel, Mark, and Ian.
Excellent!!  Now the latest version works in *any* DOS window.    Thank you very much for your help.   Here I summarize it for others who may have a similar problem to mine.
********* Summary for installation of the latest version (ADMB 11.0) with GCC compiler for Window  *************
********* for having ADMB work in *any* DOS window                                                                 *************
1.  Follow the installation process, described in the following URL 
2.  Create ADMB_HOME and PATH, and also add the following to the existing Path.
(1) Click My Computer => click Properties => then a window will pop out => click "Advanced system settings" in the window.
(2) Another window, named "System Properties" will pop out.   Choose "Advanced" menu, and then click "Environment Variables".
(3) In the window of "Environment Variables", you see two sections under "User variables for USER" and "System variables".
(4) In the section of "User variables for User", create the following variable and its value by clicking "New" button.
    ADMB_HOME        C:\ADMB
    PATH                      %ADMB_HOME%\bin;%ADMB_HOME%\utilities;%PATH%
(5) In the section of "System variables", add the following to the existing Path
Finally save them (i.e., by clicking OK button), and restart your machine.   Then you will see the latest version works in *any* DOS window.   
Thank you again.   Cheers,
Reply all
Reply to author
0 new messages