Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
en:documentation:tutorials:build:links [2020/07/16 09:17] – fleroux | en:documentation:tutorials:build:links [2023/12/12 12:59] (Version actuelle) – supprimée ltaulell | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | FIXME **Cette page n'est pas encore traduite entièrement. Merci de terminer la traduction**\\ // | ||
- | |||
- | ====== Publishing links from a bookstore ====== | ||
- | |||
- | Example with the library **HDF5** in version **1.8.9** | ||
- | |||
- | ===== Static or Dynamic Linkage ===== | ||
- | |||
- | In the subdirectory '' | ||
- | |||
- | < | ||
- | ls / | ||
- | libhdf5.a | ||
- | libhdf5.so | ||
- | ... | ||
- | </ | ||
- | |||
- | Whether static or dynamic, to use this library, when editing links (compilation step), you have to add : | ||
- | < | ||
- | | ||
- | </ | ||
- | |||
- | ===== Using the dynamic version ===== | ||
- | |||
- | By default, it is the dynamic version that is first searched for when editing links. In this case, at program execution (e.g. on nodes), the variable '' | ||
- | |||
- | * For csh (and tcsh) : | ||
- | |||
- | <code bash> | ||
- | setenv LD_LIBRARY_PATH "/ | ||
- | </ | ||
- | |||
- | * For sh (and bash) : | ||
- | |||
- | <code bash> | ||
- | export LD_LIBRARY_PATH="/ | ||
- | </ | ||
- | |||
- | ===== Using the static version ===== | ||
- | |||
- | To link with the static version, use the '' | ||
- | |||
- | < | ||
- | gcc ... -static ... -L/ | ||
- | </ | ||
- | |||
- | ===== Remarks ===== | ||
- | |||
- | ==== -static ==== | ||
- | Using the '' | ||
- | |||
- | < | ||
- | gcc ... -static ... -L/ | ||
- | </ | ||
- | |||
- | ==== Availability ==== | ||
- | |||
- | The above discussion arises only if both versions (static and dynamic) are installed (as for HDF5). If for another library only one of the versions (static or dynamic) is installed, just add '' | ||
- | |||