Open halilpolathalil opened 1 year ago
It looks like you need exception catching in your project so you should use -sDISABLE_EXCEPTION_CATCHING=0
(or equivalently -sNO_DISABLE_EXCEPTION_CATCHING
).
When you do this and you say it gives error only ERROR 8524992
, is that a runtime error? Can you try building with -sASSERTIONS
enabled? Most likely 8524992
is the exceptions that has not been caught .. its likely the address of the C++ object that was thrown.
I develope an ionic app project. And I want to use opencv in this project to image processing. So I want to use opencv with C++ and compile with emscripten. Here is my sample cpp code.
Here is my compile command emcc setting
Here is my ionic side code
In here the openCV wasm file which is "libopencv_world.a,liblibopenjp2.a and libzlib.a " created from OpenCV 4.5 githup repo. To cereate openCV wasm file, I following the steps in https://blog.seeso.io/face-detection-on-web-tflite-wasm-simd-462975e0f628
The problem is when I compiling with emcc, throw an error like below
If I remove openCV codes from cpp file, it is compiled sucessfully. or If I remove extern "C" tag from cpp file , it is compiled successfully but in ionic project give error like testFunction is not a function. If I added -sERROR_ON_UNDEFINED_SYMBOLS=0 to emcc setting, it is compiled successfully but in ionic project it gives following error
If I set -sNO_DISABLE_EXCEPTION_CATCHING=1 emcc setting, and remove -sDISABLE_EXCEPTION_CATCHING=2 , in ionic project it gives error only ERROR 8524992 and nothing else.
I have searched all page in internet for two week but I can't solve problem. Please tell me where is my mistake. Thank you for your help.