<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Try:<div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">FUNCTION dvariable model_parameters::Richards(const dvariable &age, const dvariable &Linf, const dvariable &K, const dvariable &t0, const dvariable &p)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">{<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> {<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> dvariable Length=Linf*pow((1+(1/p)*exp(-K*(age-t0))),-p);<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> return(Length);<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> }<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">}</div></div></div></blockquote></div><div><br><div><div>On Aug 11, 2014, at 3:49 PM, Mark Maunder <<a href="mailto:mmaunder@iattc.org">mmaunder@iattc.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Why do I get an error if I put the following function in the file CAPAM_Growth.hpp and include it using #include<CAPAM_Growth.hpp> but if I put it in the tpl using the FUNCTION section I do not? The translator appears to just put it in the cpp with no changes<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">dvariable model_parameters::Richards(const dvariable &age, const dvariable &Linf, const dvariable &K, const dvariable &t0, const dvariable &p)<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">{<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> {<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> dvariable Length=Linf*pow((1+(1/p)*exp(-K*(age-t0))),-p);<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> return(Length);<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> }<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">}<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">The errors I get are<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">In file included from igm.cpp:3:0:<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">./CAPAM_Growth.hpp:130:142: error: invalid use of incomplete type 'struct model_parameters'<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">c:/ADMB/admb101-gcc452-win32\include/admodel.h:107:9: error: forward declaration of 'struct model_parameters'<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">igm.cpp: In member function 'virtual void model_parameters::userfunction()':<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">igm.cpp:127:46: error: no matching function for call to 'Richards(prevariable, named_dvariable&, named_dvariable&, param_init_number&, named_dvariable&)'<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">igm.cpp:128:58: error: no matching function for call to 'Richards(prevariable&, named_dvariable&, named_dvariable&, param_init_number&, named_dvariable&)'<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">igm.cpp:139:49: error: no matching function for call to 'Richards(double&, named_dvariable&, named_dvariable&, param_init_number&, named_dvariable&)'<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">The selectivity<span class="Apple-converted-space"> </span><span style="">special issue of the journal Fisheries Research is now published</span><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><a href="http://www.sciencedirect.com/science/journal/01657836/158/supp/C" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://www.sciencedirect.com/science/journal/01657836/158/supp/C</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><p class="MsoNormal" style="margin: 0in 0in 6pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white; background-position: initial initial; background-repeat: initial initial;"><span style="">The Stock Synthesis special issue of the journal Fisheries Research<o:p></o:p></span></p><p class="MsoNormal" style="margin: 0in 0in 6pt; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white; background-position: initial initial; background-repeat: initial initial;"><span style=""><a href="http://www.sciencedirect.com/science/journal/01657836/142" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://www.sciencedirect.com/science/journal/01657836/142</span></a><o:p></o:p></span></p><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Mark Maunder <o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Head of the Stock Assessment Program <o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="ES-PE">Inter-American Tropical Tuna Commission <o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="ES-TRAD">8901 La Jolla Shores Dr.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="ES-TRAD">La Jolla, CA 92037-1508, USA<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="ES-PE"> <o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Tel: (858) 546-7027<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Fax: (858) 546-7133<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><a href="mailto:mmaunder@iattc.org" style="color: purple; text-decoration: underline;"><span style="color: blue;">mmaunder@iattc.org</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><a href="http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://www.fisheriesstockassessment.com/TikiWiki/tiki-index.php?page=Mark+Maunder</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Visit the Center for the Advancement of Population Assessment Methodology at<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><a href="http://www.capamresearch.org/" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://www.capamresearch.org/</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">Visit the AD Model Builder project at<o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> <a href="http://admb-project.org/" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://admb-project.org/</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">See the following website for information on fisheries stock assessment<span class="Apple-converted-space"> </span><a href="http://www.fisheriesstockassessment.com/" style="color: purple; text-decoration: underline;"><span style="color: blue;">http://www.fisheriesstockassessment.com/</span></a><o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"> <o:p></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div></div><div><br class="webkit-block-placeholder"></div>--<span class="Apple-converted-space"> </span><br>You received this message because you are subscribed to the Google Groups "admb-users" group.<br>To unsubscribe from this group and stop receiving emails from it, send an email to<span class="Apple-converted-space"> </span><a href="mailto:admb-users+unsubscribe@googlegroups.com" style="color: purple; text-decoration: underline;">admb-users+unsubscribe@googlegroups.com</a>.<br>To post to this group, send email to<span class="Apple-converted-space"> </span><a href="mailto:admb-users@googlegroups.com" style="color: purple; text-decoration: underline;">admb-users@googlegroups.com</a>.<br>Visit this group at<span class="Apple-converted-space"> </span><a href="http://groups.google.com/group/admb-users" style="color: purple; text-decoration: underline;">http://groups.google.com/group/admb-users</a>.<br>For more options, visit<span class="Apple-converted-space"> </span><a href="https://groups.google.com/d/optout" style="color: purple; text-decoration: underline;">https://groups.google.com/d/optout</a>.</div></blockquote></div><br></div></body></html>