Unable to use Core on Windows

75 views Asked by At

I'm trying to use the Core package in OCaml, and I cannot seem to get it working. I have installed the core package using opam install core, which worked just fine. However, when I try to load the package in utop with #require "core";;, I get an error that I do not understand at all. When I try to use Core in a dune project, I also get an error. FWIW, I'm using OCaml version 4.14.0, and I have version 0.16.2 of core installed. I am also on Windows (which Core should support, as per this page).

In utop, I ran the following command:

#require "core";;

which produced the following output:

Cannot load required shared library dllbase_bigstring_stubs.
Reason: C:\Users\USERNAME\AppData\Local\opam\playground\lib/stublibs\dllbase_bigstring_stubs.dll: Cannot resolve memmem.
Error: Reference to undefined global `Base_bigstring'

In addition, I tried building a dune project with core, and that didn't work either. Here is what was in my dune file:

(executable
 (public_name helloworld)
 (name main)
 (libraries helloworld stdio core))

And this was my main.ml file (just uses Core's print_endline function)

open! Core

let () = print_endline "hello world"

Compiling produces this error:

File "bin/dune", line 3, characters 7-11:
3 |  (name main)
           ^^^^
** Cannot resolve symbols for C:\Users\USERNAME\AppData\Local\opam\playground\lib\base_bigstring\libbase_bigstring_stubs.lib(src\base_bigstring_stubs.obj):
 memmem
File "caml_startup", line 1:
Error: Error during linking (exit code 2)

I can't use any of Core's libraries or functions, and I really would like to get this working on Windows.

0

There are 0 answers