From 4d1c070b813f3b3b64bd8bf96723756041840ac0 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sat, 6 Sep 2025 12:59:56 +0200 Subject: 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 --- C/HF/chap8/src/libs/encrypt2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 C/HF/chap8/src/libs/encrypt2.c (limited to 'C/HF/chap8/src/libs') 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 +#include + +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"); +} -- cgit v1.2.3