emscripten-core/emscripten

To use dlopen, you need to use Emscripten's linking support

オープン

#4,387 opened on 2016/06/07

 (21 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (3,519 件のフォーク)batch import
good first bughelp wantedwontfix

Repository metrics

Stars
 (27,361 個のスター)
PR merge metrics
 (平均マージ 19d 10h) (30d で 147 merged PRs)

説明

I try to link dynamic lib to my code, but I get message as in issue name. I use dlopen for link library and set compilers flags from main - MAIN_MODULE=1 and SIDE_MODULE=1 for .so. My Makefile for dynamic lib:

libWebLib.js: WebLib.cpp
    emcc -fPIC -c WebLib.cpp -o WebLib.o
    emcc -shared -Wl,libWebLib.js -o libWebLib.js WebLib.o -s SIDE_MODULE=1
clean: $rm *.o *.so

And loadlib:

  void *handle;
  handle = dlopen("libWebLib.so", RTLD_NOW);

コントリビューターガイド