I'm building a third-party C library with emcc (version 1.38.38) in two steps:
Unfortunately I'm getting undefined symbols. What I've tried so far:
It looks like I'm missing something very elementary which I yet failing to find an answer about, so I'm asking you:
How to build static library that I can use later on while compiling code with emcc?
So, OK, I was stupid enough to ask this question, let me contribute to the community and confess what was the problem, may be it will help for someone else.
This code works:
emcc -s WASM=1 -Isrc main.c src/lib.a
while this won't
emcc -s WASM=1 -Isrc src/lib.a main.c
The order is imporant so shame on me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With