bug-ncurses
[Top][All Lists]
Advanced

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

Re: Compiling ncurses with Emscripten


From: Ilya Petrov
Subject: Re: Compiling ncurses with Emscripten
Date: Thu, 28 Jun 2018 18:39:11 +0500

After `make clean` and another series of trial and error I was managed to compile ncurses without warnings.
Still doesn't work in a browser, but now with another error ("Error opening terminal: unknown").
Sorry for disturbing you and thank you for your great library.

On Thu, Jun 28, 2018 at 4:39 PM, Ilya Petrov <address@hidden> wrote:
Hello.

I try to compile ncurses to WASM with Emscripten.

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]