jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.18k stars 1.73k forks source link

Building windows static library #955

Closed carlo-quinonez closed 4 years ago

carlo-quinonez commented 4 years ago

We use libsodium when building a native module for NodeJS and would like to statically link the library.

On Ubuntu, we can build libsodium with ./configure --with-pic --disable-pie --enable-static and can link against the libsodium.a file without having to include any additional files when we distribute our native Node module.

How can we accomplish the same thing on Windows?

jedisct1 commented 4 years ago

The pre-built files include libraries that can be statically linked.

And in your project, define SODIUM_STATIC.