Sorry for not providing accurate enough reproduction-steps. I've set up a 
repository at github: https://github.com/cee-dee/emscripten-tests
Additionally I've created two issues which describe exactly what to do in 
order to see the problems.

The directory "embind-test-01" contains the problem which I mentioned here, 
the directory "webidl-test-01" contains a reduced test where I experimented 
with the webidl-binding, where I at least partially succeeded, but still 
have the problem that --closure 1 won't produce usable results.

Best regards,
Björn


Am Mittwoch, 6. Mai 2015 20:54:25 UTC+2 schrieb Alon Zakai:
>
> I can't reproduce the problem on that testcase, but maybe we are doing 
> things a little differently (it doesn't build by itself). Can you please 
> file a github issue with complete steps to reproduce?
>
>
> On Tue, May 5, 2015 at 5:44 AM, Björn K. <[email protected] 
> <javascript:>> wrote:
>
>> Hi there!
>>
>> When using the sample c++ code from
>>
>> https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html#classes
>> it just works as long as I do not use the optimization -O2.
>>
>> When I compile with that option, my browser always tells me "TypeError: 
>> Module.MyClass is not a constructor". In 
>> https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html#calling-compiled-c-functions-from-javascript-using-ccall-cwrap
>>  
>> it sais "At higher optimisation levels (-O2 and above), the *closure 
>> compiler* 
>> <https://kripken.github.io/emscripten-site/docs/site/glossary.html#term-closure-compiler>
>>  
>> runs and minifies (changes) function names. Exporting functions allows you 
>> to continue to access them using the original name through the global 
>> Module object.", so I tried using the option -s EXPORTED_FUNCTIONS, but 
>> it seems to work only for functions, not classes.
>>
>> What am I doing wrong? Would it work to export global functions which 
>> serve as constructors for my classes? Sounds like a hack to me...
>>
>> Best regards,
>> Björn
>>
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to