Skip to content

Commit

Permalink
Fix "Cannot call unknown function" error in minified code.
Browse files Browse the repository at this point in the history
-s EXPORTED_FUNCTIONS switch does not definded. So, minified code was not able to run...
emscripten-core/emscripten#849
  • Loading branch information
logue committed Dec 4, 2013
1 parent 8645d01 commit 1beef3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EMCC:=emcc
EMCC_OPTS:=-O1 -s LINKABLE=1 -s ASM_JS=0
EMCC_OPTS:=-O1 -s LINKABLE=1 -s ASM_JS=0 -s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="['_get_lame_version', '_lame_init', '_lame_init_params', '_lame_set_mode', '_lame_get_mode', '_lame_set_num_samples', '_lame_get_num_samples', '_lame_set_num_channels', '_lame_get_num_channels','_lame_set_in_samplerate', '_lame_get_in_samplerate', '_lame_set_out_samplerate', '_lame_get_out_samplerate', '_lame_set_brate','_lame_get_brate','_lame_set_VBR','_lame_get_VBR', '_lame_set_VBR_q', '_lame_get_VBR_q', '_lame_set_VBR_mean_bitrate_kbps', '_lame_get_VBR_mean_bitrate_kbps', '_lame_set_VBR_min_bitrate_kbps', '_lame_get_VBR_min_bitrate_kbps', '_lame_set_VBR_max_bitrate_kbps', '_lame_get_VBR_max_bitrate_kbps', '_lame_encode_buffer_ieee_float', '_lame_encode_flush', '_lame_close']"
EMCONFIGURE:=emconfigure
EMMAKE:=emmake
LAME_URL:="http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz"
Expand All @@ -14,7 +14,7 @@ dist/libmp3lame.js: $(LAME) pre.js post.js
$(EMCC) $(EMCC_OPTS) --pre-js pre.js --post-js post.js $(wildcard $(LAME)/libmp3lame/*.o) -o $@

dist/libmp3lame.min.js: dist/libmp3lame.js
closure-compiler $< --language_in ECMASCRIPT5 --js_output_file $@
./compiler.jar $< --language_in ECMASCRIPT5 --js_output_file $@

$(LAME): $(LAME).tar.gz
$(TAR) xzvf $@.tar.gz && \
Expand Down

0 comments on commit 1beef3c

Please sign in to comment.