annotate tests/unpoly.ur @ 1892:907a82a44f01

Add missing inter-library dependencies This is needed, at least on recent Ubuntu, to fix these linker errors when compiling any Ur/Web application: liburweb.so: undefined reference to `lround' liburweb.so: undefined reference to `ceil' liburweb.so: undefined reference to `RAND_bytes' liburweb.so: undefined reference to `DES_fcrypt' liburweb.so: undefined reference to `SHA256_Init' liburweb.so: undefined reference to `SHA256_Final' liburweb.so: undefined reference to `SHA256_Update' Signed-off-by: Anders Kaseorg <andersk@mit.edu> --- src/c/Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
author Anders Kaseorg <andersk@mit.edu>
date Thu, 21 Nov 2013 14:32:11 -0500
parents 338be96f8533
children
rev   line source
adamc@1185 1 val current = return (Some "1")
adamc@1185 2 fun resolve (_ : string) = return (Some "2")
adamc@1185 3
adamc@1185 4 fun checkDeps deps =
adamc@1185 5 u <- current;
adamc@1185 6 List.foldlM (fn s (good, errs) =>
adamc@1185 7 v' <- resolve s;
adamc@1185 8 case v' of
adamc@1185 9 None =>
adamc@1185 10 return (False, <xml>
adamc@1185 11 {errs}
adamc@1185 12 Unknown library path <tt>{[s]}</tt>.<br/>
adamc@1185 13 </xml>)
adamc@1185 14 | Some v' =>
adamc@1185 15 b <- return True;
adamc@1185 16 if b then
adamc@1185 17 return (good, errs)
adamc@1185 18 else
adamc@1185 19 return (False, <xml>
adamc@1185 20 {errs}
adamc@1185 21 Access denied to <tt>{[s]}</tt>.<br/>
adamc@1185 22 </xml>)) (True, <xml/>) deps
adamc@1185 23
adamc@1185 24 fun main () =
adamc@1185 25 p <- checkDeps ("a" :: "b" :: []);
adamc@1185 26 return <xml><body>
adamc@1185 27 {p.2}
adamc@1185 28 </body></xml>