From 85976c1497df904a14e35b67a38f0f3d0828d3db Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:17:16 +0200 Subject: [PATCH] api: support platform-independent API library path (#1407) --- cmd/api/execute.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/api/execute.cpp b/cmd/api/execute.cpp index 03f6d444a5..453e539b44 100644 --- a/cmd/api/execute.cpp +++ b/cmd/api/execute.cpp @@ -42,12 +42,14 @@ using namespace silkworm; using namespace silkworm::snapshot; using namespace silkworm::cmd::common; -const char* kSilkwormApiLibPath = "../../silkworm/api/libsilkworm_api.dylib"; +const char* kSilkwormApiLibUndecoratedPath = "../../silkworm/api/silkworm_api"; const char* kSilkwormInitSymbol = "silkworm_init"; const char* kSilkwormAddSnapshotSymbol = "silkworm_add_snapshot"; const char* kSilkwormExecuteBlocksSymbol = "silkworm_execute_blocks"; const char* kSilkwormFiniSymbol = "silkworm_fini"; +const auto kSilkwormApiLibPath{boost::dll::shared_library::decorate(kSilkwormApiLibUndecoratedPath)}; + //! Function signature for silkworm_init C API using SilkwormInitSig = int(SilkwormHandle**);