简介
这是一个通用c工具库,支持 unix(android)/windows 等平台
组件
-  
log
- logger : logger门面. xlog 和 slog 实现它定义的宏
 - xlog : 支持打印 level/tag/tid/time 这些log头和日志信息
 - slog : 简易log实现,实际上是对printf的二次包装, 只支持打印level/tag和日志信息
 
 -  
thread
 -  
data
 -  
file
 -  
memory
- string : asprintf, stringbuilder, str_params, strlcpy, strlcat, strreplace, strsplit, strtrim, strutf8len …
 - allocator : 跟踪和检测heap内存,帮助你提早发现内存泄露和踩内存等问题.
 - mplite : 内存池实现 sqlite’s memsys5 memory subsystem
 
 -  
ring_buffer
 -  
time
 
编译
-  
常用平台 (windows/linux/android)
platform onekey deploy build manual build windows deploy_for_windows.bat releasemake_windows.bat win32 release 1linux chmod +x *.sh && ./deploy_for_linux.sh releasechmod +x *.sh && ./make_cross_platform.sh linux m64 releaseandroid deploy_for_android.bat release c++_staticmake_android.bat armeabi-v7a release -  
其他平台 (交叉编译)
set(unix true cache bool "") set(cmake_system_name linux) # this one is important set(cmake_system_version 1) # this one not so much # tell the cmake script what the platform name is, must setup this for cross compile set(platform hisi) # important: tell script the platform name set(cross_toolchain_dir "/root/toolchains/hisi-linux/x86-arm/arm-himix100-linux") set(cross_toolchain_path_prefix "${cross_toolchain_dir}/bin/arm-himix100-linux-") message(status "current cross_toolchain_path_prefix is => ${cross_toolchain_path_prefix}") #set compiler location set(cmake_c_compiler "${cross_toolchain_path_prefix}gcc") set(cmake_cxx_compiler "${cross_toolchain_path_prefix}g++") set(cmake_ar "${cross_toolchain_path_prefix}ar") set(cmake_linker "${cross_toolchain_path_prefix}ld") set(cmake_ranlib "${cross_toolchain_path_prefix}ranlib") set(cmake_strip "${cross_toolchain_path_prefix}strip") set(cmake_find_root_path ${cross_toolchain_dir}) # sysroot. set(cmake_sysroot "${cross_toolchain_dir}/sysroot") # search for programs in the build host directories set(cmake_find_root_path_mode_program never) # for libraries and headers in the target directories set(cmake_find_root_path_mode_library only) set(cmake_find_root_path_mode_include only) set(platform_common_flags " -fpic") string(append cmake_c_flags "${platform_common_flags}") string(append cmake_cxx_flags "${platform_common_flags}") string(append cmake_exe_linker_flags "${platform_common_flags} -fpie") add_definitions(-d_lcu_not_support_pthread_setname) # custom compile definitions./make_cross_platform.sh hisi releasecmake -h. -b./build_abcd -dbuild_static_libs=on -dbuild_shared_libs=off -dbuild_demo=off -dcmake_try_compile_target_type=static_library -dcmake_toolchain_file=./cmake/toolchains/abcd.toolchain.cmake cmake --build ./build_abcd --config release --target lcu_static 
使用
示例
许可证
联系方式
更新日志
-  
1.8.0
 -  
1.7.0
 -  
1.6.0
 -  
1.5.6
 -  
1.5.5
 -  
1.5.3
 -  
1.5.2
 -  
1.4.1
 -  
1.0.0 ~ 1.4.0
 
            
                                            
                                            
                                            
发表评论