polyc looks very useful. I just tried it out for 1723 and noticed a few things:
1. -L${LIBDIR} is missing in the case when -o is not specified, causing the error: /usr/bin/ld: cannot find -lpolymain /usr/bin/ld: cannot find -lpolyml collect2: ld returned 1 exit status
2. The Makefile.am has EXTRA="$(EXTRALDFLAGS)" which should, perhaps, be EXTRALDFLAGS="$(EXTRALDFLAGS)" as EXTRALDFLAGS is used inside the script.
3. In the polyc that was built, I see EXTRA=" " As it stands, the Poly/ML lib directory is not added to the linker path so I presume (for Linux) that this was meant to contain something like -Wl,-rpath ${LIBDIR} so that it is not necessary to set LD_LIBRARY_PATH before running the executable.
Phil
On 05/04/13 13:24, David Matthews wrote:
I've added a "polyc" script that is generated from the build process. The idea of this is to provide the similar sort of functionality that users of C expect from the "cc" command. It's very simple at the moment and is limited to a few options. It compiles an ML source file and exports the "main" function. The -o option specifies where the executable is to be placed, defaulting to a.out on Unix.
david@dunedin:~$ cat hello.ML fun main() = print "Hello World\n"; david@dunedin:~$ polyc hello.ML -o hello david@dunedin:~$ ./hello Hello World
The script includes the path names to where the poly binary and the libraries will be installed so it's not possible to run it within the build directory. David _______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml