EMSCRIPTEN_BINDINGS(my_class) {
emscripten::class_<Wasm_bind_test>("Wasm_bind_test")
.constructor<>()
.function("decete_init",&Wasm_bind_test::decete_init)
.function("decete_wasm",&Wasm_bind_test::decete_wasm, allow_raw_pointers())
;
Is it bound as in the above code?add allow_raw_pointers()

在2021年6月23日星期三 UTC+8 下午4:12:55<[email protected]> 写道:

> Did you bind Ph?
>
> On Wed, 23 Jun 2021 at 09:37, Qiang Li <[email protected]> wrote:
>
>> Thank you for response!
>>     But I added allow_raw_pointers() When running, JS will report the 
>> error "Cannot call Wasm_bind_test.decete_wasm due to unbound types: Ph", 
>> what is the reason for this error?
>>
>> 在2021年6月21日星期一 UTC+8 下午4:50:33<[email protected]> 写道:
>>
>>>
>>> https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#embind-raw-pointers
>>> Using raw pointers isn't allowed by default. In order to do it requires 
>>> explicitly stating that you do it.
>>>
>>> On Mon, 21 Jun 2021 at 11:23, Qiang Li <[email protected]> wrote:
>>>
>>>> Hi
>>>>     I encountered some problems in using embind. I have a function in 
>>>> class which parameter is an original pointer of char type. When I 
>>>> registered the function with embind, I got the following error, hoping to 
>>>> get an answer.
>>>> [image: image.png]
>>>> [image: image.png]
>>>> [image: image.png]
>>>>
>>>> -- 
>>>> 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 [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/emscripten-discuss/CAAw1VV%2BWdyM1Xu3xfzvs5qbMz8Z2c8U5%2BhFsB6XXj0%2B6P%2BjjOQ%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAAw1VV%2BWdyM1Xu3xfzvs5qbMz8Z2c8U5%2BhFsB6XXj0%2B6P%2BjjOQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> -- 
>> 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 [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/a86df1fd-aeb2-42c2-a7db-206ed5c292c0n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/emscripten-discuss/a86df1fd-aeb2-42c2-a7db-206ed5c292c0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/21793f10-892a-4001-84d3-deaf3eb7b2e7n%40googlegroups.com.

Reply via email to