WebAssembly in Action (p.98) 책 내용대로 컴파일 했더니 나중에 HTML 까지 만들고 실행했을 때 Uncaught TypeError: Module._malloc is not a function 에러가 나왔다. 책에 있는 내용 emcc validate.cpp -o validate.js -s EXTRA_EXPORTED_RUNTIME_METHODS=['ccall','UTF8ToString'] 수정한 내용 emcc validate.cpp -o validate.js -s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall','UTF8ToString']" -s EXPORTED_FUNCTIONS="['_malloc', '_free']" 끝!
이런 에러가 발생했다. 작성한 코드는 아래와 같다. ...생략... openImage: function () { this.outCanvas = document.getElementById("outCanvas"); this.outCtx = this.outCanvas.getContext("2d"); //url 지우기(누수 막기) this.imgURL = URL.revokeObjectURL(this.imgURL); this.inFile = this.$refs["image"].files[0]; //그림 파일을 이미지 객체로 불러오기 let inImg = new Image(); //이미지 객체 생성 //src로 넣을 url 만들기 this.imgURL = URL.createObjectURL(this.inFile);..