<div dir="ltr">Thank you all for testing and providing feedback.  I was able to duplicate and resolve the issue.<div>The problem was user system PATH having sh.exe or bash.exe in it.  This caused the build files </div><div>
to use Unix commands like cp or rm instead of copy or del for Windows.  The fixes have been </div><div>committed to version control.  Please update your copy and test the procedures in</div><div><br></div><div><a href="http://www.admb-project.org/buildbot/documentation/" target="_blank">http://www.admb-project.org/buildbot/documentation/</a></div>

<div><br></div><div>As always, thank you for providing feedback.</div><div><br></div><div>Cheers,</div><div>Johnoel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 16, 2013 at 8:03 AM, dave fournier <span dir="ltr"><<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 13-11-15 11:49 PM, Jon Schnute wrote:<br>
<br>
As far as I can tell we are using the same code from source forge and installing the same way.<br>
<br>
I moved to a non re example.  To simplify I also set the environment string ADMB_HOME<br>
<br>
ADMB_HOME=H:\oldave\admb\<u></u>build\dist<br>
<br>
However<br>
<br>
H:\oldave\admb\examples\admb\<u></u>catage>admb.bat catage<br>
<br>
produces<br>
<br>
Error: tpls.tpl not found<br>
<br>
I can do the job with<br>
<br>
tpl2cpp catage<br>
<br>
followed by<br>
<br>
H:\oldave\admb\examples\admb\<u></u>catage>adcomp.bat catage<br>
<br>
which produces<br>
<br>
g++ -c  -O3 -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I. -I"H:\oldave\admb\build\dist\<u></u>include" -I"H:\oldave\admb\build\dist\<u></u>contrib\include" -o catage.obj catage.cpp<br>

<br>
and creates catage.exe which runs fine.<br>
<br>
I suspect you are finding the wrong library somewhere.  You could edit the adcomp.bat file to add a -v<br>
<br>
g++ -c  -v -O3 -D__GNUDOS__  -Dlinux -DOPT_LIB -DUSE_LAPLACE -fpermissive -I. -I"H:\oldave\admb\build\dist\<u></u>include" -I"H:\oldave\admb\build\dist\<u></u>contrib\include" -o catage.obj catage.cpp<br>

<br>
and see where it finds all the libraries.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Very interesting! You're obviously a better picker of Gnu software than I<br>
am. Can you please give me the precise link you used to download the Gnu<br>
software? Also, were you working with source code from ADMB 11.1 or the more<br>
current version from the SVN repository?<br>
<br>
Incidentally, I used the Gnu installer 'mingw-get-setup.exe' available at:<br>
<br>
<a href="http://sourceforge.net/projects/mingw/files/Installer/" target="_blank">http://sourceforge.net/<u></u>projects/mingw/files/<u></u>Installer/</a><br>
<br>
I then used this to install the three packages mingw32-base,<br>
mingw32-gcc-g++, and msys-base. The fact that you and I get different<br>
results shows that it matters which software is used. (By the way, I used an<br>
example without random effects, but surely that shouldn't be relevant.)<br>
<br>
I have another question for the ADMB community. The ADMB Downloads site<br>
<br>
<a href="http://code.google.com/p/admb-project/downloads/list" target="_blank">http://code.google.com/p/admb-<u></u>project/downloads/list</a><br>
<br>
has the file 'admb-11.1-windows-mingw-<u></u>32bit.zip'. Can anyone tell me<br>
precisely which Gnu software was used to build this binary image? Someone<br>
must know because someone must have built it.<br>
<br>
Thanks. I think we're getting close.<br>
<br>
Jon<br>
<br>
-----Original Message-----<br>
From: dave fournier [mailto:<a href="mailto:davef@otter-rsch.com" target="_blank">davef@otter-rsch.com</a>]<br>
Sent: November-15-13 2:58 PM<br>
To: Jon Schnute; <a href="mailto:users@admb-project.org" target="_blank">users@admb-project.org</a><br>
Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys - Please fix the<br>
bug identified by Dave<br>
<br>
On 13-11-15 01:54 PM, Jon Schnute wrote:<br>
<br>
No it compiled fine. It was the tpl2rem step that failed.<br>
Since I was interested in the link step with g++ I used a different version<br>
if ADMB to produce the polio.cpp and polio.htp files.<br>
The compile and link using these files ran fine.  So I guess I have no idea<br>
why you got the winmain problem.<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Dave! That's very helpful and it replicates my own experience,<br>
although you don't say precisely how the attempt to build the 'polio'<br>
example failed. (I wonder if it involved a mysterious reference to<br>
'WinMain@16' at the link step.)<br>
<br>
Please note that my request has nothing to do with R. All I want is a well<br>
defined procedure for building ADMB on Windows with msys/gcc. Your example<br>
and my own experience confirm that it is possible to build the ADMB binary<br>
library successfully by that route. And I'm really pleased to learn that<br>
this library actually is OK. However, you've demonstrated that the current<br>
version of ADMB has a bug in its batch scripts in the \bin directory. As<br>
</blockquote>
you<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
say, the command<br>
<br>
admb -r polio<br>
<br>
failed, yet you used manual scripts to make it work.<br>
<br>
Can someone please fix this bug? I'm not sure how this would work, but<br>
perhaps you need to send the detailed scripts that actually worked for you<br>
to the right person (Johnoel?).<br>
<br>
Incidentally, I suggested Rtools only as a possibly reliable source for<br>
mingw/gcc, given that Arni has used it in the past. I realize that many<br>
</blockquote>
ADMB<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
users have probably abandoned the Windows OS, but you still have a<br>
</blockquote>
sizeable<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
user community that uses that platform. All I'm asking is that Windows<br>
</blockquote>
users<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
should be able to download ADMB source, build it, and use it like everyone<br>
else. Unfortunately, because Windows is a crippled OS, we need to take<br>
seriously the source for Unix tools on that platform. From your<br>
</blockquote>
experience,<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
it sounds as if that shouldn't be a big deal, although the batch scripts<br>
need to be fixed.<br>
<br>
I'm trying to be helpful. Once I have a procedure that actually works,<br>
</blockquote>
I'll<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
be glad to document it if people are interested. Please note that we need<br>
</blockquote>
to<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
consider both 32- and 64- bit versions of the software. I've noticed that<br>
several msys sources are available on the Internet, so the documentation<br>
would need to be explicit about that.<br>
<br>
Best wishes,<br>
<br>
Jon<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:users-bounces@admb-project.org" target="_blank">users-bounces@admb-project.org</a><br>
</blockquote>
[mailto:<a href="mailto:users-bounces@admb-project.org" target="_blank">users-bounces@admb-<u></u>project.org</a>]<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Behalf Of dave fournier<br>
Sent: November-14-13 3:53 PM<br>
To: <a href="mailto:users@admb-project.org" target="_blank">users@admb-project.org</a><br>
Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys<br>
<br>
<br>
I was curious to see how hard this is.<br>
<br>
I downloaded the current mingw compiler and msys tools from source forge.<br>
I modifed my path to include the three directores for gcc msys tools and<br>
admb as below.<br>
<br>
PATH=H:\oldave\admb\build\<u></u>dist\bin;c:\MinGW\msys\1.0\<u></u>bin\;c:\MinGW\bin;<br>
<br>
I changed to the admb directory and typed make.  ADMB was built<br>
successfully.<br>
<br>
then I tried to compile the polio example<br>
<br>
The command<br>
<br>
               admb -r polio<br>
<br>
did not work for me.  Since I was really interested in whether the library<br>
is correct and don't like those overly complicated scripts anyway I built<br>
the cpp and htp by hand and then compiled<br>
it with   mygccs.bat where mygccs.bat contained<br>
<br>
g++.exe -Dlinux -DUSE_LAPLACE polio.cpp -o polio.exe -I.<br>
-Ih:/oldave/admb/build/dist/<u></u>include -Lh:/oldave/admb/build/dist/<u></u>lib -ladmb<br>
<br>
<br>
This built the polio.exe which ran successfully.<br>
<br>
I can't imagine  the average R user getting anywhere with this.<br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@admb-project.org" target="_blank">Users@admb-project.org</a><br>
<a href="http://lists.admb-project.org/mailman/listinfo/users" target="_blank">http://lists.admb-project.org/<u></u>mailman/listinfo/users</a><br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
Users mailing list<br>
<a href="mailto:Users@admb-project.org" target="_blank">Users@admb-project.org</a><br>
<a href="http://lists.admb-project.org/mailman/listinfo/users" target="_blank">http://lists.admb-project.org/<u></u>mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>