The Mercury Project
Re: [mercury-users] Newbie questions

Home

News

Information
  Overview
  Features
  Documentation
  Papers
  Developers
  Events
  Reports

Mailing Lists
  Developers
  Users
  Search

Download
  Current Release
  Snapshot
  Old Releases

Related
  Applications
  MCORBA
  Contributing Code

Contact

Search

Subject: Re: [mercury-users] Newbie questions
From: John Eikenberry (jae@zhar.net)
Date: Mon Dec 11 2000 - 21:26:21 EST


Fergus Henderson wrote:

> To install the Posix library, do the following:
>
> cd extras/posix
> mmake libposix.depend

This worked but it caused an error:

$ mmake libposix.depend
mmc --generate-dependencies libposix
Error: can't read source file for module `libposix'.
For more information, try recompiling with `-E'.
make: *** [libposix.depend] Error 1

> mmake libposix.install INSTALL_PREFIX=/my/install/dir LIBGRADES=

I left out 'LIBGRADES=' and even though it errored out at the end it seemed
to work. I was able to compile and run the included extras/posix/hello.m
example fine (I did remove all the other files first, to make it use the
installed version).

In case you're curious, here's the error:

/bin/sh: -c: line 2: syntax error: unexpected end of file
make[1]: *** [libposix.install_grades] Error 2
make[1]: Leaving directory `/home/jae/Current/Mercury/posix'
make: *** [libposix.install] Error 1

> cp *.h /my/install/dir/lib/mercury/inc
>
> If you want to install versions of the Posix library that are compiled
> with debugging, profiling, etc. then leave off the "LIBGRADES=".
> If you want to install in the same place as the other Mercury
> libraries, then leave off the "INSTALL_PREFIX=/my/install/dir".
>
> Then in your application's Mmakefile put
>
> EXTRA_LIBRARIES = posix
> EXTRA_LIB_DIRS = /whatever/lib/mercury

Yep... adding these to the top of the Mmakefile for hello.m did the trick.

Also firgured out I could also set them as env vars and use 'mmake -e'...
cool.

> This is documented in the "Libraries" chapter of the Mercury user
> guide, in particular the last section.

Thanks again.

-- 

John Eikenberry [jae@zhar.net - http://zhar.net] ______________________________________________________________ "A society that will trade a little liberty for a little order will deserve neither and lose both." --B. Franklin -------------------------------------------------------------------------- mercury-users mailing list post: mercury-users@cs.mu.oz.au administrative address: owner-mercury-users@cs.mu.oz.au unsubscribe: Address: mercury-users-request@cs.mu.oz.au Message: unsubscribe subscribe: Address: mercury-users-request@cs.mu.oz.au Message: subscribe --------------------------------------------------------------------------



This mail archive was generated by hypermail 2b25 on Sun Dec 31 2000 - 00:40:04 EST.