Tencent / MMKV

An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.
Other
17.39k stars 1.91k forks source link

[POSIX] can't find ::unlink symbol #1233

Closed richerfu closed 7 months ago

richerfu commented 8 months ago

Note:

An crash issue will be ignored & closed in a week without logs.

The language of MMKV

Try to use core to build with HarmonyOS, but get some error

image

The version of MMKV

master branch

The platform of MMKV

harmonyos

The installation of MMKV

cmake

What's the issue?

Try to build source code with harmonyos, but failed. Look like that needs to add unistd header file.

Should we add this header into MMKV_IO.cpp file?

cmake

# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(MyApplication2)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

add_subdirectory(MMKV/Core)

add_library(entry SHARED hello.cpp)
target_link_libraries(entry PUBLIC libace_napi.z.so core)
lingol commented 8 months ago

Yep, sure.

richerfu commented 8 months ago

It works. Can you publish a release version? Thanks a lot

lingol commented 8 months ago

A posix port doesn't really rely on official release because it is mainly used by sources. So a new release won't be needed for this bug.

richerfu commented 8 months ago

Is this commit will merged to master branch?

lingol commented 8 months ago

It will, eventually.

lingol commented 7 months ago

It's released with v1.3.4.