<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I followed the instructions on how to build this library.<div class="">It installed lots of files into here, for example:</div><div class=""><br class=""></div><div class=""> /usr/local/mercury-rotd-2021-04-15/extras/lib/mercury/inc/posix.kill.mh</div><div class=""><br class=""></div><div class="">When I try to import it I get an error, it can’t find it. The build process seemed to know where to put it so how do I tell it where to find it, I possibly naively assumed it would be automatic?</div><div class=""><br class=""></div><div class="">I have —zero— knowledge of Mmake and any command line magic.</div><div class=""><br class=""></div><div class="">Here is my meagre excuse of a program, for educational purposes I wanted to write a little app that could scan the `cwd` for all files ending in `.m` then remove any build files. Yes, I know I can tell it to explicitly use a folder and also I could write a makefile and do `make clean` but then I wouldn’t be learning Mercury would I?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- module mwipe.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- interface.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- import_module io.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- pred main(io::di, io::uo) is det.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- implementation.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">:- import_module dir, list, posix, string.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal; min-height: 18px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">main(!IO) :-</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> dir.current_directory(D, !IO),</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ( D = ok(Dir),</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> io.format("looking for crufty files in %s...\n", [s(Dir)], !IO)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> D = error(_),</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> io.format("oops: \n", [], !IO)</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> ).</span></div></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">And the error:</span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 15px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> mercury_compile: cannot find `posix.int' in directories .,</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> /usr/local/mercury-rotd-2021-04-15/lib/mercury/ints</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">But I know the module got installed into:</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-size: 14px;" class=""> /usr/local/mercury-rotd-2021-04-15/extras/</span></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-size: 14px;" class=""><br class=""></span></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-size: 14px;" class="">I also tried this command, after trying to search the archives,</span></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span style="font-size: 14px;" class=""><br class=""></span></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #2fb41d" class=""> $ </span><span style="font-variant-ligatures: no-common-ligatures" class="">EXTRA_LIBRARIES=posix mmc mwipe.m </span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> mercury_compile: error: the library `posix' cannot be found in grade `hlc.gc’.</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">So I am a little mystified as to what is ‘due process’ to tell it how to find posix. I also want to play around with the graphics stuff and all the other libraries too so this is going to be something I need to master early on!</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Thanks,</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Sean</span></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div></span></div></body></html>