If you've installed polyml in a non-standard location, e.g. I have it in /Users/ldixon/local/polyml-5.4, then you need to also setup the library path appropriately, e.g.
export POLYML_PATH="/Users/ldixon/local/polyml-5.4" export POLYML_LIB="${POLYML_PATH}/lib" export LD_RUN_PATH="${POLYML_LIB}:${LD_RUN_PATH}" cc -o empty-top-level-poly noprint-poly.o -L${POLYML_LIB} -lpolymain -lpolyml
best, lucas
On 06/10/2011 21:42, Hong Feng wrote:
Rob's suggestion of using the export should do what you want:
PolyML.export("noprint-poly", (fn () => (PolyML.print_depth 0; PolyML.Compiler.prompt1 := ""; PolyML.Compiler.prompt2 := ""; PolyML.rootFunction ())) );
Then you can run to make the new ml binary: cc -o empty-top-level-poly noprint-poly.o -lpolymain -lpolyml
Sorry, I can not reproduce this on my computer, the compiling yields:
,------------------------------------------------------------- [hf@mail ~]$ cc -o empty-top-level-poly noprint-poly.o -lpolymain -lpolyml /usr/bin/ld: cannot find -lpolymain `-------------------------------------------------------------
Regards, Hong