[ADMB Users] init_bounded_vector_vector

k.curti kiersten.curti at gmail.com
Fri Oct 14 20:35:02 PDT 2011


Hi-

I am running ADMB V9.0.x with the Borland compiler on Windows 7.

I am trying to use an init_bounded_vector_vector to initialize a
matrix where I can specify different phases for each vector within the
matrix.

I can compile and run the program if I declare the parameter but do
not use it.  However, as soon as I try to use the parameter, even in a
simple cout statement, the program will not compile and I receive the
following error:

Error: Unresolved external 'dvar_matrix::dvar_matrix(const
param_init_bounded_vector_vector&)' referenced from C:\MY_PROGRAMS\ADMB
\TESTPARAM\TESTPARAM.OBJ

I appreciate any insight you may have.  I have included an example and
full error message below.

Thank you


TestVec.tpl:

DATA_SECTION
  init_int nsp;                        //Number of species
  init_ivector nFt(1,nsp);       //Number of fishing mortality
parameters to be estimated
  init_ivector phase(1,nsp);

PARAMETER_SECTION
  objective_function_value ofv;
  init_number dummy;
  init_bounded_vector_vector dFt(1,nsp,1,nFt,-5,5,phase);

PROCEDURE_SECTION
  cout<<"TEST_COUT_STATEMENT\n"<<dFt<<endl;
  cout<<"phase\n"<<phase<<endl;
  exit(-1);



TestVec.dat:

# nsp
   3
 # nFt
   30 30 29
# ph
   3 3 3



Error message:

C:\admb_test_code\TestVecVec>tpl2cpp TestVec
xxglobal.tmp
xxhtop.tmp
header.tmp
xxalloc.tmp
xxtopm.tmp
        1 file(s) copied.

C:\admb_test_code\TestVecVec>call mybcc TestVec

C:\admb_test_code\TestVecVec>bcc32 -v -O2 -Vd -c -
DUSE_LAPLACE;DOS386;OPT_LIB -I. -I""\include -I""\include TestVec.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
testvec.cpp:

C:\admb_test_code\TestVecVec>call lnkadmb TestVec

C:\admb_test_code\TestVecVec>bcc32 -v -L""\lib -L""\lib TestVec.obj
df1b2stub.lib admod32.lib adt32.lib ado32.lib
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external 'dvar_matrix::dvar_matrix(const
param_init_bounded_vector_vector&)' referenced from C:\ADMB_TEST_CODE
\TESTVECVEC\TESTVEC.OBJ

Tool completed with exit code 1




More information about the Users mailing list