From 1291cd4cec9970537d13596dbca4266a309be552 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sat, 19 Jul 2025 21:48:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9version=E7=9A=84=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=BD=8D=E7=BD=AE,=20=E5=8A=A0=E9=80=9F=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/components/api/zi_module.hpp | 3 ++- usrc/version.c | 4 +--- usrc/version.h | 10 +++++++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sdk/components/api/zi_module.hpp b/sdk/components/api/zi_module.hpp index 952c0de..65535de 100644 --- a/sdk/components/api/zi_module.hpp +++ b/sdk/components/api/zi_module.hpp @@ -4,6 +4,7 @@ #include #include "a8000_protocol\protocol.hpp" + #include "version.h" namespace iflytop { using namespace std; @@ -69,7 +70,7 @@ class ZIModule { virtual ~ZIModule() {} ZIModule(int32_t type) { module_type = type; - module_version = get_app_version(); + module_version = ::get_app_version(); } public: diff --git a/usrc/version.c b/usrc/version.c index df85e9f..8183655 100644 --- a/usrc/version.c +++ b/usrc/version.c @@ -2,6 +2,4 @@ int32_t APP_VERSION = 1214; -int32_t get_app_version(){ - return APP_VERSION; -} +int32_t get_app_version() { return APP_VERSION; } diff --git a/usrc/version.h b/usrc/version.h index 139d0b1..38be2f7 100644 --- a/usrc/version.h +++ b/usrc/version.h @@ -1,4 +1,12 @@ #pragma once +#ifdef __cplusplus +extern "C" { +#endif #include +int32_t get_app_version(); + + +#ifdef __cplusplus +} +#endif -int32_t get_app_version(); \ No newline at end of file