Using custom libs .a files

85 views
Skip to first unread message

Mehaboob kk

unread,
Apr 14, 2021, 3:45:50 PM4/14/21
to emscripten-discuss
Hello All,

I see that Emscripton allows to compile .a files to wasm. In order for this to work the .a file need to be originally compiled using gcc? if yes, any specific version to be compatible? 

Thanks,
Mehaboob

Thomas Lively

unread,
Apr 14, 2021, 4:14:26 PM4/14/21
to emscripte...@googlegroups.com
Hi Mehaboob,

No, Emscripten cannot compile native objects or archive files to WebAssembly. Perhaps what you saw was a reference to archive files containing WebAssembly objects produced by Emscripten?

Thomas

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/ee46348f-db22-406d-b85d-7dae3aa57e8an%40googlegroups.com.

Mehaboob kk

unread,
Apr 28, 2021, 6:30:53 PM4/28/21
to emscripte...@googlegroups.com
Hi Thomas,

Thanks for your input, I was referring to the Using Libraries section here https://emscripten.org/docs/compiling/Building-Projects.html#using-libraries 

Thanks,
Mehaboob



You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/5-IfzGR_ioQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAJZD_EUz2Mkh3S1%2Bh7iGox2Pk3KZWOvMKOrr8a7sNSoZyG7rnw%40mail.gmail.com.

Sam Clegg

unread,
Apr 29, 2021, 1:39:57 AM4/29/21
to emscripte...@googlegroups.com
On Wed, Apr 28, 2021 at 3:30 PM Mehaboob kk <mehab...@gmail.com> wrote:
Hi Thomas,

Thanks for your input, I was referring to the Using Libraries section here https://emscripten.org/docs/compiling/Building-Projects.html#using-libraries 


 As Thomas says, you can't use native object files with emscripten, so you don't need gcc at all.  All the instructions one that page refer to building libraries with the emcc compiler.   When you use emcmake and emconfigure it configures your project to use emcc rather than any host/local compiler.

cheers,
sam

Reply all
Reply to author
Forward
0 new messages