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