chetmurthy / ocaml-cppffigen Goto Github PK
View Code? Open in Web Editor NEWC++ FFI Generator for Ocaml
License: Apache License 2.0
C++ FFI Generator for Ocaml
License: Apache License 2.0
Hi,
First of all, thanks for creating this library and I'm hoping to use it in a project. I'm trying to build the example on my machine (g++ 11.2, OCaml 4.13.1, Fedora 35) and after running make
, I get the following output:
ocamlfind ocamlopt -thread -package result,threads,oUnit -c ocaml_somecode.ml some_code.ml
g++ -c -fPIC -g2 -I. -I`ocamlfind query cppffigen` -I/home/dan/.opam/default/lib/ocaml -std=gnu++11 -fno-rtti -DPIC -o ocaml_somecode_stubs.o ocaml_somecode_stubs.cc
In file included from ocaml_somecode_stubs.cc:4:
/home/dan/.opam/default/lib/cppffigen/cppffi.inc: In function ‘value c2ml(const string&)’:
/home/dan/.opam/default/lib/ocaml/caml/mlvalues.h:290:24: error: invalid conversion from ‘const void*’ to ‘void*’ [-fpermissive]
290 | #define String_val(x) ((const char *) Bp_val(x))
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
| |
| const void*
/home/dan/.opam/default/lib/cppffigen/cppffi.inc:75:11: note: in expansion of macro ‘String_val’
75 | memmove(String_val(res), v.c_str(), size);
| ^~~~~~~~~~
In file included from ocaml_somecode_stubs.cc:3:
/usr/include/string.h:47:29: note: initializing argument 1 of ‘void* memmove(void*, const void*, size_t)’
47 | extern void *memmove (void *__dest, const void *__src, size_t __n)
| ~~~~~~^~~~~~
make: *** [Makefile:45: ocaml_somecode_stubs.o] Error 1
Do you know what could be causing the issue or whether it is reproducible on your system?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.