没有为以下模块提供实现

No implementations provided for the following modules

我遇到了 corebuild 的问题。我编写了以下程序:

open Core.Std
open Smtp

type person = {
  name: string;
  address: Smtp_unix.Addr.t
}

let send p1 p2 =
  Smtp_unix.sendmail ~host:"gmail.google.fr"
    ~name:"gmail.google.com"
    ~from:(Smtp_unix.Addr.of_string "<hidden>")
    ~to_:[p1.address]
    ~body:("Hello "^p2.name)
    ()

let () =
  let p1 = {name="alice"; address = Smtp_unix.Addr.of_string "alice@example.com"} in
  let p2 = {name="bob"; address = Smtp_unix.Addr.of_string "bob@example.com"} in
  match send p1 p2 with
  | `Ok _ -> printf "Mail sent"
  | `Failure (_,m) -> printf "Error: %s" m

根据 Merlin 是正确的。要编译它,我 运行 以下命令

corebuild example.native -package smtp

我收到以下错误,我不明白。

Error: No implementations provided for the following modules:
         Smtp_unix referenced from example.cmx

我不明白哪里出了问题。有什么想法吗?

看起来 smtp 需要 smtp_unix。

corebuild send.native -package smtp.unix -package smtp