【问题标题】:Compiling C-OCaml interfacing example from the manual从手册中编译 C-OCaml 接口示例
【发布时间】:2013-11-28 15:40:26
【问题描述】:

我正在尝试在 cygwin 下(通过 cygwin 的官方安装程序安装)编译 http://caml.inria.fr/pub/docs/manual-ocaml-4.01/intfc.html 的第 19.8 节中的 C 互操作性示例,并且我收到链接器错误:未定义对 `flexdll_dlopen' 的引用。谁知道怎么解决?

【问题讨论】:

    标签: ocaml


    【解决方案1】:

    Cygwin 上的 OCaml 使用 flexdll,所以

    cc -c main.c
    flexlink -chain cygwin -exe -o prog.exe main.o mod.a -lcurses
    

    而不是cc -o prog main.c mod.a -lcurses

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-07
      • 2017-10-09
      • 2010-09-15
      • 2011-10-18
      • 2015-11-20
      • 2012-03-30
      • 1970-01-01
      相关资源
      最近更新 更多