diff options
| author | Carlos Maiolino <[email protected]> | 2025-09-06 12:59:56 +0200 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-09-06 13:01:26 +0200 |
| commit | 4d1c070b813f3b3b64bd8bf96723756041840ac0 (patch) | |
| tree | 72a58d5c43e218e2700c30ac29db1b5a98ba8b65 /C/HF/chap8/src/libs | |
| parent | 133a564a7ba1f57ff229e7c181227d43b4bae584 (diff) | |
Create shared library
Play with shared libs. Building the same library with different
functionalities and loading them at runtime, separately.
Fun way to see how we can change runtime behavior without recompiling
everything.
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'C/HF/chap8/src/libs')
| -rw-r--r-- | C/HF/chap8/src/libs/encrypt2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/C/HF/chap8/src/libs/encrypt2.c b/C/HF/chap8/src/libs/encrypt2.c new file mode 100644 index 0000000..939df8b --- /dev/null +++ b/C/HF/chap8/src/libs/encrypt2.c @@ -0,0 +1,11 @@ +#include <stdio.h> +#include <libs/encrypt.h> + +void encrypt(char *message, encrypt_fn_t encrypt_fn) { + encrypt_fn(message); +} + +void encrypt_arr(char *message, encrypt_arr_t fn_arr, int size) +{ + printf("BROKEN LIB\n"); +} |
