hi Ronny!

On Wed, 19 Jul 2023 02:45:53 -0700 (PDT)
Ronny Nissengold <ronny....@gmail.com> wrote:

> Thank you all for your support.
> I was able to successfully compile my project with pthread enabled.
> Now I face a new problem, I used Module._malloc to pass an  image from a 
> webcam into my cpp function
> For that I used the following linker 
> flags: add_link_options(-sINITIAL_MEMORY=800MB -sTOTAL_STACK=80MB -O3 -s 
> -sEXPORTED_FUNCTIONS=['_malloc','_free'] -sASSERTIONS -pthread)
> 
> Now I get the following error in my console:
> 
> Uncaught ReferenceError: SharedArrayBuffer is not defined
>     at blink_landmark_detector_sample.js:1:9999
> 
> (index):11 Uncaught TypeError: Module._malloc is not a function
>     at _arrayToHeap ((index):11:24)
>     at HTMLVideoElement.computeFrame ((index):40:22)
> 
> Any idea what happened?

try using 'Module.malloc' [without the underscore] or 'cwrap'.

HTH

> Thanks!
> Ronny



-- 

Shlomi Fish       https://www.shlomifish.org/
https://github.com/shlomif/validate-your-html - Validate Your HTML

Chuck Norris knows what the gender of Great A’Tuin, the Discworld world turtle,
is.
    — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/20230720095515.761f4246%40telaviv1.shlomifish.org.

Reply via email to