Commit b9dd7c13 authored by Kirill Smelkov's avatar Kirill Smelkov

Try to autoload libk

Still the same:

wasm@deco:~/trydynlib$ node prog.js
prog!
external function 'kfunc1' is missing. perhaps a side module was not linked in? if this function was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment
external function 'kfunc1' is missing. perhaps a side module was not linked in? if this function was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment
exception thrown: abort("external function 'kfunc1' is missing. perhaps a side module was not linked in? if this function was expected to arrive from a system library, try to build the MAIN_MODULE with EMCC_FORCE_STDLIBS=1 in the environment") at Error
    at jsStackTrace (/home/wasm/trydynlib/prog.js:1135:13)
    at stackTrace (/home/wasm/trydynlib/prog.js:1152:12)
    at abort (/home/wasm/trydynlib/prog.js:106462:44)
    at _kfunc1 (/home/wasm/trydynlib/prog.js:7564:27)
    at _main (/home/wasm/trydynlib/prog.js:30421:8)
    at Object.asm._main (/home/wasm/trydynlib/prog.js:105715:21)
    at Object.callMain (/home/wasm/trydynlib/prog.js:106292:30)
    at doRun (/home/wasm/trydynlib/prog.js:106350:60)
    at run (/home/wasm/trydynlib/prog.js:106364:5)
    at Object.<anonymous> (/home/wasm/trydynlib/prog.js:106487:1)
parent c2cd1a06
......@@ -18,4 +18,4 @@ libk_so.$(SO) : libk.c
prog.js : prog.c libk_so.$(SO)
$(CC) -s MAIN_MODULE=1 -o $@ prog.c
$(CC) -s MAIN_MODULE=1 -s RUNTIME_LINKED_LIBS="['libk_so.$(SO)']" -o $@ prog.c
......@@ -1532,6 +1532,8 @@ Module["preloadedImages"] = {}; // maps url to image data
Module["preloadedAudios"] = {}; // maps url to audio data
if (!Module['dynamicLibraries']) Module['dynamicLibraries'] = [];
Module['dynamicLibraries'] = ["libk_so.js"].concat(Module['dynamicLibraries']);
addOnPreRun(function() {
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment