[ADMB Users] Broken tpl2cpp in Windows
Johnoel Ancheta
johnoel at hawaii.edu
Wed Apr 22 12:21:28 PDT 2009
Thanks Arni,
Created the issue
http://code.google.com/p/admb-project/issues/detail?id=59
Target for next Milestone3.
Johnoel
----- Original Message -----
From: Arni Magnusson <arnima at hafro.is>
Date: Wednesday, April 22, 2009 6:40 am
Subject: Re: Broken tpl2cpp in Windows
To: Johnoel Ancheta <johnoel at hawaii.edu>
Cc: users at admb-project.org
> I finally found the problem. The broken tpl2cpp in ADMB for
> MinGW gets
> created from the call:
>
> gcc -I. -DUX mylex.c -otpl2cpp
>
> The -DUX should only be used when compiling mylex.c->tpl2cpp on
> Linux. In
> mylex.c, Dave Fournier defined a macro called UX that helps the
> compiler
> choose the right lines of code, depending on whether mylex.c is
> being
> compiled on Windows or Linux. By using -DUX it calls things
> appropriate
> for Linux, while bypassing the code intended for Windows. In
> other words,
> a healthy tpl2cpp for MinGW should be created with the call
>
> gcc -I. mylex.c -otpl2cpp
>
> or better still
>
> gcc -s mylex.c -o tpl2cpp
>
> for a leaner executable.
>
> ---
>
> The problem lies in mingw.mak, which currently calls
> optg32-rh8-laplace.mak. As the name implies, the latter makefile
> is
> intended for Red Hat 8 Linux and is therefore not appropriate
> for making
> ADMB for Windows.
>
> The solution is to edit mingw.mak so that it calls a makefile
> intended for
> making ADMB for Windows. This is a much better solution than
> making ADMB
> for Windows dependent on cat.exe. Dave Fournier already did the
> hard work
> creating the UX macro to make ADMB for Windows self-contained.
>
> The same corrections need to be made for tpl2rem, which also
> uses Red Hat
> 8 Linux makefiles. It looks like the Windows makefiles will be
> very
> similar, except no -DUX.
>
> Quack,
>
> Arni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20090422/05f684cc/attachment.html>
More information about the Users
mailing list