[ADMB Users] g++ compile and link

Arni Magnusson arnima at hafro.is
Wed Dec 10 15:14:42 PST 2008


On Wed, 10 Dec 2008, Jon Schnute wrote:

> Thanks Arni! That really helps. I'm glad you've taken seriously the
> problem of finding scripts that work generically. You say that your
> "Linux scripts are practically identical". Given that there must be some
> differences, would you mind sending them, too?
>
> [...]
>

Sure thing, here they are. What I meant by practically identical is that
there are no differences in the g++ calls, only Dos vs. Bash script
ornaments. Although I haven't bothered to use double quoted "%ADMB_HOME%"
and "$ADMB_HOME" a formal release should probably do so, in case the
directory name contains spaces, like the infamous c:/program files.

---

adcomp and adcompr

#!/bin/bash
g++ -c -O3 -Wno-deprecated -D__GNUDOS__ -Dlinux -DOPT_LIB -DUSE_LAPLACE
-fpermissive -I. -I$ADMB_HOME/include $1.cpp


adlink

#!/bin/bash
g++ -s $1.o -L$ADMB_HOME/lib -ldf1b2stub -ladmod -ladt -lado -ldf1b2stub
-ladmod -ladt -lado -o$1


adlinkr

#!/bin/bash
g++ -s $1.o -L$ADMB_HOME/lib -ldf1b2o -ladmod -ladt -lado -ldf1b2o -ladmod
-ladt -lado -o$1


admake

#!/bin/bash
tpl2cpp $1
adcomp $1
adlink $1


admaker

#!/bin/bash
tpl2rem $1
adcompr $1
adlinkr $1





More information about the Users mailing list