调整C++ 代码
This commit is contained in:
@@ -20,7 +20,10 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
# 添加共享库
|
||||
add_library(${PROJECT_NAME} ${STATIC_OR_SHARED} library.cpp)
|
||||
add_library(${PROJECT_NAME} ${STATIC_OR_SHARED}
|
||||
Calculate.cpp
|
||||
CalculateInfo.h
|
||||
)
|
||||
|
||||
# 解析配置
|
||||
if(EX_PLATFORM EQUAL 32)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#include "library.h"
|
||||
#include "Calculate.h"
|
||||
|
||||
#include <iostream>
|
||||
|
@@ -2,12 +2,7 @@
|
||||
#define CPPLIB_LIBRARY_H
|
||||
|
||||
#include <string>
|
||||
|
||||
struct CalculateInfo {
|
||||
std::string name;
|
||||
std::string versionName;
|
||||
int versionCode;
|
||||
};
|
||||
#include "CalculateInfo.h"
|
||||
|
||||
class Calculate {
|
||||
public:
|
17
cppLib/CalculateInfo.h
Normal file
17
cppLib/CalculateInfo.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Created on 2024/5/28.
|
||||
//
|
||||
// Node APIs are not fully supported. To solve the compilation error of the interface cannot be found,
|
||||
// please include "napi/native_api.h".
|
||||
|
||||
#ifndef HM4DEMO_CALCULATEINFO_H
|
||||
#define HM4DEMO_CALCULATEINFO_H
|
||||
|
||||
#include <string>
|
||||
struct CalculateInfo {
|
||||
std::string name;
|
||||
std::string versionName;
|
||||
int versionCode;
|
||||
};
|
||||
|
||||
#endif //HM4DEMO_CALCULATEINFO_H
|
BIN
cppLib/dist/lib/arm64-v8a/libcalculate.so
vendored
BIN
cppLib/dist/lib/arm64-v8a/libcalculate.so
vendored
Binary file not shown.
Reference in New Issue
Block a user