The final executable can be linked to the dynamic library by passing this -rpath=/your_absolute_path_to_dynamic_lib
flag to the -linker-option
flag in the kotlinc-native compiler. The compile time linking should be done using the .def
files or can be done manually, by passing flags to cinterop. The executable wont be linked if its NOT linked during compile time.