googlecodelabs / web-assembly-introduction

Introduction to Web Assembly
Apache License 2.0
27 stars 9 forks source link

Cannot instantiate WebAssembly #11

Closed matsbror closed 5 years ago

matsbror commented 5 years ago

I am following the instructions to "Instantiate the Game of Life via JavaScript". At this point, I get the following error when trying to instantiate: Uncaught (in promise) LinkError: WebAssembly Instantiation: Import #1 module="env" function="__memory_base" error: global import must be a number or WebAssembly.Global object

This makes it impossible to reach the exports.

Attaching my javascript/html code as text. index.html.txt

matsbror commented 5 years ago

So I found out the reason. With later version of emcc replace memoryBase with __memory_base and tableBase with __table_base

sayantan-sadhukhan commented 2 years ago

not working by replacing the table with __table_base & the memory with __memory_base ,the error is still there for me!

script.js:31 Uncaught (in promise) LinkError: WebAssembly.instantiate(): Import #0 module="env" function="exit" error: function import requires a [callable]