If you are using cmake to setup your build then it works like on any other 
platform, for instance to declare a static link library:

https://github.com/floooh/cimgui-sokol-starterkit/blob/d87dfedb9c70958983c1c66e470757f796f183b0/CMakeLists.txt#L12-L21

...and then to link this library to an executable:

https://github.com/floooh/cimgui-sokol-starterkit/blob/d87dfedb9c70958983c1c66e470757f796f183b0/CMakeLists.txt#L55

...and finally to configure and build, you can use the emcmake wrapper 
script that's included in the Emscripten SDK, this invokes cmake with the 
right cross-compiling toolchain file, e.g. see:

https://github.com/floooh/cimgui-sokol-starterkit#build-and-run-wasmhtml-version-via-emscripten-linux-macos

Cheers!
On Friday, 25 November 2022 at 10:16:09 UTC+1 [email protected] wrote:

> Hello,
> it's possibile create a static library with emscripten to avoid to 
> recompile every time
> a common code? If it's possible can explain me how do it on linux?
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/d9422857-b95b-47a5-9561-14389031cebdn%40googlegroups.com.

Reply via email to