diff --git a/apps/multiplatform/common/src/commonMain/cpp/android/simplex-api.c b/apps/multiplatform/common/src/commonMain/cpp/android/simplex-api.c index 54478425f1..4fd62524de 100644 --- a/apps/multiplatform/common/src/commonMain/cpp/android/simplex-api.c +++ b/apps/multiplatform/common/src/commonMain/cpp/android/simplex-api.c @@ -49,6 +49,13 @@ Java_chat_simplex_common_platform_CoreKt_initHS(__unused JNIEnv *env, __unused j // from simplex-chat typedef long* chat_ctrl; +/* + When you start using any new function from Haskell libraries, + you have to add the function name to the file libsimplex.dll.def in the root directory. + And do the same by adding it into flake.nix file in the root directory, + Otherwise, Windows and Android libraries cannot be built. +*/ + extern char *chat_migrate_init(const char *path, const char *key, const char *confirm, chat_ctrl *ctrl); extern char *chat_send_cmd(chat_ctrl ctrl, const char *cmd); extern char *chat_send_remote_cmd(chat_ctrl ctrl, const int rhId, const char *cmd); diff --git a/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c b/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c index 1c4ad1142e..fb561dc38d 100644 --- a/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c +++ b/apps/multiplatform/common/src/commonMain/cpp/desktop/simplex-api.c @@ -22,6 +22,13 @@ Java_chat_simplex_common_platform_CoreKt_initHS(JNIEnv *env, jclass clazz) { // from simplex-chat typedef long* chat_ctrl; +/* + When you start using any new function from Haskell libraries, + you have to add the function name to the file libsimplex.dll.def in the root directory. + And do the same by adding it into flake.nix file in the root directory, + Otherwise, Windows and Android libraries cannot be built. +*/ + extern char *chat_migrate_init(const char *path, const char *key, const char *confirm, chat_ctrl *ctrl); extern char *chat_send_cmd(chat_ctrl ctrl, const char *cmd); extern char *chat_send_remote_cmd(chat_ctrl ctrl, const int rhId, const char *cmd); diff --git a/libsimplex.dll.def b/libsimplex.dll.def index 2d6e813d77..4255f4409c 100644 --- a/libsimplex.dll.def +++ b/libsimplex.dll.def @@ -1,6 +1,7 @@ LIBRARY libsimplex EXPORTS hs_init + hs_init_with_rtsopts chat_migrate_init chat_send_cmd chat_send_remote_cmd