Simple embind example doesn't seem to work #17246
Replies: 2 comments 8 replies
-
I tried to expose Point as emscripten::class and it works fine. But neither emscripten::value_object nor emscripten::value_array works
|
Beta Was this translation helpful? Give feedback.
-
I don't think value_object is meant to be used with emscripten/tests/embind/embind_test.cpp Lines 2579 to 2582 in df69d56 emscripten/tests/embind/embind_test.cpp Lines 2588 to 2590 in df69d56 emscripten/tests/embind/embind.test.js Lines 2408 to 2412 in df69d56 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
main.cpp
my_js.js
Build command: emcc main.cpp -o main.js -lembind
emsdk version is 3.1.13
Runtime error:
TypeError: Module.Point is not a constructor
at Object.Module.onRuntimeInitialized (C:\projects\opengl_wasm\bind_small_example\my_js.js:7:15)
at doRun (C:\projects\opengl_wasm\bind_small_example\main.js:3138:71)
at run (C:\projects\opengl_wasm\bind_small_example\main.js:3155:5)
at runCaller (C:\projects\opengl_wasm\bind_small_example\main.js:3060:19)
at removeRunDependency (C:\projects\opengl_wasm\bind_small_example\main.js:1404:7)
at receiveInstance (C:\projects\opengl_wasm\bind_small_example\main.js:1592:5)
at receiveInstantiationResult (C:\projects\opengl_wasm\bind_small_example\main.js:1610:5)
Beta Was this translation helpful? Give feedback.
All reactions