janestreet / base_bigstring

String type based on Bigarray, for use in I/O and C-bindings
MIT License
11 stars 8 forks source link

Cannot resolve symbols for … : memmem #6

Open Chimrod opened 1 year ago

Chimrod commented 1 year ago

Hello, I cannot link the code when using mingw / windows.

The function memmem is not implemented in mingw. The library compile fine, but when I want to build some code using it, there is an error in the linking stage.

jonahbeckford commented 11 months ago

This affects MSVC as well. For now, I'll use the opam-cross-windows patch in DkML, with the changes:

  1. static linkage so does not escape the scope of the stubs file
  2. a Windows preprocessor guard so can be used in Unix

ref: https://github.com/diskuv/diskuv-opam-repository/blob/231969744fdeb1e76f2f850079c3e0f0fd94fc1c/packages/base_bigstring/base_bigstring.v0.16.0/files/base_bigstring-v0.16.0.patch