# cbus **Repository Path**: northqd2018/cbus ## Basic Information - **Project Name**: cbus - **Description**: communication bus: a base library for communication between module and module or component and component. - **Primary Language**: C - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-08-31 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cbus communication bus: a base library for communication between module and module or component and component. # 思维导图 docs目录下的“cbus概念架构.emmx”为mindmaster 思维导图工具所绘制 # 编译工具 ## 1. 在qtcreator下编译 目前是在Windows下的qt creator中编写,故可以使用qt creator 打开工程并编译。 ## 2. 在visual studio2017中编译 在项目的src目录下有一个builds目录,其中的vs2017便是cbus的visual studio工程,在使用visual studio进行编译之前需要做两个前提工作: ### a. 配置pthread的环境 到 ftp://sourceware.org/pub/pthreads-win32/ 目录下载Windows版的pthread版本,目前是用的最新的2.9.1版本。 下载解压之后,其目录下会有“Pre-built.2”目录,此目录下有include,lib,dll三个子目录,其中include是头文件,lib是visual studio依赖的dll的接口导出文件(xxx.lib),dll目录下就是pthread相关的动态库。 - 将include目录下的文件拷贝到“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include”目录下(具体根据实际的visual studio版本和安装路径进行修改) - 将lib目录下的文件夹根据x86和x64的分类拷贝的到“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\lib”目录 - 将dll目录下x86子目录下的内容拷贝到“C:\Windows\SysWOW64”目录,将x64字目录下的内容拷贝到“C:\Windows\System32”目录下,注意:这里说的是64位操作系统的情况 ### b. 为visual studio 创建unistd.h文件 创建一个unistd.h头文件,其内容为: ```c #ifndef _UNISTD_H #define _UNISTD_H #include #include #endif /* _UNISTD_H */ ``` 将这个头文件拷贝至“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include”