[ADMB Users] ADMB with gcc, mingw, and/or msys - Please fix the bug identified by Dave

Jon Schnute schnutej-dfo at shaw.ca
Fri Nov 15 23:49:18 PST 2013

Very interesting! You're obviously a better picker of Gnu software than I
am. Can you please give me the precise link you used to download the Gnu
software? Also, were you working with source code from ADMB 11.1 or the more
current version from the SVN repository?

Incidentally, I used the Gnu installer 'mingw-get-setup.exe' available at:


I then used this to install the three packages mingw32-base,
mingw32-gcc-g++, and msys-base. The fact that you and I get different
results shows that it matters which software is used. (By the way, I used an
example without random effects, but surely that shouldn't be relevant.)

I have another question for the ADMB community. The ADMB Downloads site


has the file 'admb-11.1-windows-mingw-32bit.zip'. Can anyone tell me
precisely which Gnu software was used to build this binary image? Someone
must know because someone must have built it.

Thanks. I think we're getting close.


-----Original Message-----
From: dave fournier [mailto:davef at otter-rsch.com] 
Sent: November-15-13 2:58 PM
To: Jon Schnute; users at admb-project.org
Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys - Please fix the
bug identified by Dave

On 13-11-15 01:54 PM, Jon Schnute wrote:

No it compiled fine. It was the tpl2rem step that failed.
Since I was interested in the link step with g++ I used a different version
if ADMB to produce the polio.cpp and polio.htp files.
The compile and link using these files ran fine.  So I guess I have no idea
why you got the winmain problem.

> Thanks Dave! That's very helpful and it replicates my own experience,
> although you don't say precisely how the attempt to build the 'polio'
> example failed. (I wonder if it involved a mysterious reference to
> 'WinMain at 16' at the link step.)
> Please note that my request has nothing to do with R. All I want is a well
> defined procedure for building ADMB on Windows with msys/gcc. Your example
> and my own experience confirm that it is possible to build the ADMB binary
> library successfully by that route. And I'm really pleased to learn that
> this library actually is OK. However, you've demonstrated that the current
> version of ADMB has a bug in its batch scripts in the \bin directory. As
> say, the command
> admb -r polio
> failed, yet you used manual scripts to make it work.
> Can someone please fix this bug? I'm not sure how this would work, but
> perhaps you need to send the detailed scripts that actually worked for you
> to the right person (Johnoel?).
> Incidentally, I suggested Rtools only as a possibly reliable source for
> mingw/gcc, given that Arni has used it in the past. I realize that many
> users have probably abandoned the Windows OS, but you still have a
> user community that uses that platform. All I'm asking is that Windows
> should be able to download ADMB source, build it, and use it like everyone
> else. Unfortunately, because Windows is a crippled OS, we need to take
> seriously the source for Unix tools on that platform. From your
> it sounds as if that shouldn't be a big deal, although the batch scripts
> need to be fixed.
> I'm trying to be helpful. Once I have a procedure that actually works,
> be glad to document it if people are interested. Please note that we need
> consider both 32- and 64- bit versions of the software. I've noticed that
> several msys sources are available on the Internet, so the documentation
> would need to be explicit about that.
> Best wishes,
> Jon
> -----Original Message-----
> From: users-bounces at admb-project.org
[mailto:users-bounces at admb-project.org]
> On Behalf Of dave fournier
> Sent: November-14-13 3:53 PM
> To: users at admb-project.org
> Subject: Re: [ADMB Users] ADMB with gcc, mingw, and/or msys
> I was curious to see how hard this is.
> I downloaded the current mingw compiler and msys tools from source forge.
> I modifed my path to include the three directores for gcc msys tools and
> admb as below.
> PATH=H:\oldave\admb\build\dist\bin;c:\MinGW\msys\1.0\bin\;c:\MinGW\bin;
> I changed to the admb directory and typed make.  ADMB was built
> successfully.
> then I tried to compile the polio example
> The command
>               admb -r polio
> did not work for me.  Since I was really interested in whether the library
> is correct and don't like those overly complicated scripts anyway I built
> the cpp and htp by hand and then compiled
> it with   mygccs.bat where mygccs.bat contained
> g++.exe -Dlinux -DUSE_LAPLACE polio.cpp -o polio.exe -I.
> -Ih:/oldave/admb/build/dist/include -Lh:/oldave/admb/build/dist/lib -ladmb
> This built the polio.exe which ran successfully.
> I can't imagine  the average R user getting anywhere with this.
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users

More information about the Users mailing list