项目中用到mosquitto,在进行源码编译时遇到问题,特进行记录汇总
1.Could NOT find cJSON
具体报错信息为:
-- Could NOT find cJSON (missing: CJSON_INCLUDE_DIR CJSON_LIBRARY)
-- Optional dependency cJSON not found. Some features will be disabled.
解决办法:
最好在工程文件夹下创建一专门用于编译cJSON的文件夹,执行如下代码
git clone https://github.com/DaveGamble/cJSON.git
cd cJSON
mkdir build
cmake ..