Drkcore

11 07 2009 OCaml Tweet

OCamlのUnknow directive

ocamlnetのhttp clientのサンプルを実行しようとしたら

#require "netclient";;
open Http_client.Convenience;;
let get_and_print url =
  let s = http_get url in
  print_string s;
  flush stdout
;;

このrequireでエラー

# #require "netclient";;
Unknown directive `require'.

解決方法

sudo port install caml-findlib

で、.ocamlinitに

#use "topfind"

と書いておく。

モジュールっていうかライブラリ周りの流儀がまだよく分かってない。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021