nettle: Linking

1 
1 5 Linking
1 *********
1 
1 Nettle actually consists of two libraries, ‘libnettle’ and ‘libhogweed’.
1 The ‘libhogweed’ library contains those functions of Nettle that uses
1 bignum operations, and depends on the GMP library.  With this division,
1 linking works the same for both static and dynamic libraries.
1 
1    If an application uses only the symmetric crypto algorithms of Nettle
1 (i.e., block ciphers, hash functions, and the like), it’s sufficient to
1 link with ‘-lnettle’.  If an application also uses public-key
1 algorithms, the recommended linker flags are ‘-lhogweed -lnettle -lgmp’.
1 If the involved libraries are installed as dynamic libraries, it may be
1 sufficient to link with just ‘-lhogweed’, and the loader will resolve
1 the dependencies automatically.
1