Tencent / MMKV

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

How to use it directly in C++? #1270

Closed maoxing closed 4 months ago

maoxing commented 4 months ago

Can I directly use the source code in the Core directory to compile Android, iOS, and Windows platforms myself?

I need to use it in my C++ shared library, so what should I do?

Looking forward to your reply!

lingol commented 4 months ago

Assuming you are familiar with cmake, the core has a cmake project that you can use directly.

Most things should work, in iOS/macOS you might define FORCE_POSIX macro.

Update: you don't need to, it's already handled in the cmake project. https://github.com/Tencent/MMKV/blob/master/Core/CMakeLists.txt#L33

maoxing commented 4 months ago

thanks s lot, i'll do it