And now everything works (and I understand it)! Sorry for the noise.

Emscripten is a truly great project!

On Saturday, November 18, 2017 at 4:20:50 PM UTC+1, Michel VAN DEN BERGH 
wrote:
>
> Ok after loading my own emscripten compiled script with <script 
> type="text/javascript" src="blah.js"></script> the Module object suddenly 
> became populated with the missing methods. It still don't precisely what 
> goes on but at least I can execute code now! Great.
>
> On Saturday, November 18, 2017 at 2:12:11 PM UTC+1, Michel VAN DEN BERGH 
> wrote:
>>
>> This is the output of console.log(Object.keys(Module));
>>
>>  Array [ "arguments", "preRun", "postRun", "print", "printErr", "canvas", 
>> "setStatus", "totalDependencies", "monitorRunDependencies", 
>> "memoryInitializerRequest" ]
>>
>> No ccall, cwrap, callMain,...
>>
>> I can understand this since in the .html file the Module object seems to 
>> be created from scratch (it contains var Module {...}). However how to 
>> reconcile this with 
>>
>>
>> https://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html#ccall
>>   
>> :-(
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Saturday, November 18, 2017 at 12:56:48 PM UTC+1, Michel VAN DEN BERGH 
>> wrote:
>>>
>>> I would like to modify the standard emscripten generated .html file so 
>>> that it can run a command line program multiple times (as a precursor to 
>>> perhaps doing something more sophisticated). As a very naive test I added 
>>> Module.ccall('main'); after document.body.appendChild(script); (the latter 
>>> I think runs the command line program). However I always get a javascript 
>>> error 
>>>
>>> "Module.ccall is not a function" 
>>>
>>> ('_main' has been properly exported during compiling). 
>>>
>>> What worries me is not that it does not work but the nature of the 
>>> javascript error.
>>>
>>> Things like Module.callMain gave the same error.  Obviously I am 
>>> completely misunderstanding something. I hope someone can enlighten me... 
>>> Thanks in advance.
>>>   
>>>
>>

-- 
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