bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiling ncurses with Emscripten


From: Ilya Petrov
Subject: Compiling ncurses with Emscripten
Date: Thu, 28 Jun 2018 16:39:13 +0500

Hello.

I try to compile ncurses to WASM with Emscripten.
I log my revelations here: https://github.com/kripken/emscripten/issues/6766

The current problem I see is that

emcc hello.c -L./lib -I./include -lncurses -s WASM=1 -o hello.html
 
returns warning:

warning: unresolved symbol: _nc_tinfo_fkeys

I wonder what flags I may specify to make nc_tinfo_fkeys to resolve.
If I try this:

emcc ./objects/tic.o -L./lib -I./include -I./progs ./lib/libncurses.a hello.c -lncurses

I get:

error: Linking globals named 'main': symbol multiply defined!
ERROR:root:Failed to run llvm optimizations:

This may be an important detail about Emscripten behavior: 

Dynamic libraries that you specify in the final build stage (when generating _javascript_ or HTML) are linked in as static libraries. Emcc ignores commands to dynamically link libraries when linking together bitcode (i.e., not in the final build stage). This is to ensure that the same dynamic library is not linked multiple times in intermediate build stages, which would result in duplicate symbol errors.

Any help is welcome.
If this mailing list is not the best place for such questions just tell me.
Best regards,
Ilya.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]