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