If you are asking a question, please follow this template:
-
My goal is: Passing external c code to java
-
My actions are:
let f = ffi(‘int my_func(int, int’);
print(‘Calling C my_func:’,f(5,4));
- The result I see is:
Python requirements from /opt/Espressif/esp-idf/requirements.txt are satisfied.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CC build_info.o
CC mg_build_info.o
CC /data/fwbuild-volumes/2.16.0/apps/app1/esp32/build_contexts/build_ctx_565702140/build/objs/ffi_exports.o
/data/fwbuild-volumes/2.16.0/apps/app1/esp32/build_contexts/build_ctx_565702140/build/gen/ffi_exports.c:197:44: error: expected ‘;’, ‘,’ or ‘)’ before ‘=’ token
const struct mgos_ffi_export ffi_exports[] = {
^
/mongoose-os/platforms/esp32/src/esp32_src.mk:89: recipe for target ‘/data/fwbuild-volumes/2.16.0/apps/app1/esp32/build_contexts/build_ctx_565702140/build/objs/ffi_exports.o’ failed
make[1]: *** [/data/fwbuild-volumes/2.16.0/apps/app1/esp32/build_contexts/build_ctx_565702140/build/objs/ffi_exports.o] Error 1
make[1]: Leaving directory ‘/data/fwbuild-volumes/2.16.0/apps/app1/esp32/build_contexts/build_ctx_565702140/build/objs/mosapp’
make: *** [component-mosapp-build] Error 2
/opt/Espressif/esp-idf/make/project.mk:552: recipe for target ‘component-mosapp-build’ failed
make: Leaving directory ‘/app’
Error: exit status 2
/go/src/github.com/mongoose-os/mos/mos/build_local.go:693:
/go/src/github.com/mongoose-os/mos/mos/build_local.go:680:
/go/src/github.com/mongoose-os/mos/mos/build_local.go:445:
/go/src/github.com/mongoose-os/mos/mos/build.go:220:
/go/src/github.com/mongoose-os/mos/mos/build.go:163:
/go/src/github.com/mongoose-os/mos/mos/main.go:196: build failed
- My expectation & question is: answer must be sum of 5+4 = 9