[m-dev.] Re: problems with Interactive Queries
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jun 23 12:35:58 AEST 1999
On 22-Jun-1999, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Hi Fergus. Sorry to disturb you again.
>
> In fact, my problems with interactive queries (well, to be precise with dynamic
> linking) were due to the fact that I was using a "development" mercury
> compiler. What I mean by "development" compiler is a compiler that is "invoked"
> with the script I have appended at the end of this message.
>
> What should I modify in that script to be able to use dynamic linking with a
> "development" compiler ?
>
> --------------------------------
> My script lmc:
>
> #!/bin/sh
> dir=/tmp/mercury/stage2
>
> PATH=$dir/scripts:$dir/util:$PATH
>
> MERCURY_COMPILER=$dir/compiler/mercury_compile
> MERCURY_C_INCL_DIR=$dir/runtime
> MERCURY_INT_DIR=$dir/library
> MERCURY_LIBS="
> $dir/trace/libmer_trace.a
> $dir/browser/libmer_browser.a
> $dir/library/libmer_std.a
> $dir/runtime/libmer_rt.a
> $dir/boehm_gc/libgc.a
> -lm
> "
> MERCURY_MOD_LIB_MODS="
> $dir/browser/mer_browser.init
> $dir/library/mer_std.init
> $dir/runtime/mer_rt.init
> "
>
> export MERCURY_COMPILER
> export MERCURY_C_INCL_DIR
> export MERCURY_INT_DIR
> export MERCURY_LIBS
> export MERCURY_MOD_LIB_MODS
> export PATH
>
> case $# in
> 0) $dir/scripts/mmc ;;
> *) $dir/scripts/mmc --cflags "-I$dir/boehm_gc" "$@" ;;
> esac
>
>
>
> --
> R1.
The script below seems to work for me.
#!/bin/sh
dir=$HOME/ws/alpha-other
PATH=$dir/scripts:$dir/util:$PATH
MERCURY_COMPILER=$dir/compiler/mercury_compile
MERCURY_DEMANGLER=$dir/util/mdemangle
MERCURY_C_INCL_DIR=$dir/runtime
MERCURY_INT_DIR=$dir/library
MERCURY_MOD_LIB_MODS="
$dir/browser/mer_browser.init
$dir/library/mer_std.init
$dir/runtime/mer_rt.init
"
export MERCURY_COMPILER
export MERCURY_DEMANGLER
export MERCURY_C_INCL_DIR
export MERCURY_INT_DIR
export MERCURY_MOD_LIB_MODS
case $# in
0) $dir/scripts/mmc ;;
*) $dir/scripts/mmc \
--use-subdirs \
--cflags "-I$dir/boehm_gc/include" \
--link-flags " \
-R $dir/trace -L $dir/trace \
-R $dir/browser -L $dir/browser \
-R $dir/library -L $dir/browser \
-R $dir/runtime -L $dir/runtime \
-R $dir/boehm_gc -L $dir/boehm_gc \
" \
"$@"
;;
esac
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list