从16.04升级到18.04后,无法使用json-c构建(C)程序

时间:2019-08-16 23:05:30

标签: ubuntu-16.04 ubuntu-18.04 json-c

构建时,出现以下错误:

制造

--   mongoc found version "1.15.0"
--   mongoc include path "/usr/local/include/libmongoc-1.0;/usr/local/include/libbson-1.0"
--   mongoc libraries "/usr/local/lib/libmongoc-1.0.so;/usr/local/lib/libbson-1.0.so;rt;resolv"
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rolf/Source/sds_controller
[ 25%] Building C object CMakeFiles/sds_controller.dir/sds_controller.c.o
[ 50%] Linking C executable sds_controller
CMakeFiles/sds_controller.dir/sds_controller.c.o: In function `print_json_value':
/home/rolf/Source/sds_controller/sds_controller.c:100: undefined reference to `json_object_get_type'
/home/rolf/Source/sds_controller/sds_controller.c:104: undefined reference to `json_object_get_boolean'
CMakeFiles/sds_controller.dir/build.make:96: recipe for target 'sds_controller' failed
make[2]: *** [sds_controller] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sds_controller.dir/all' failed
make[1]: *** [CMakeFiles/sds_controller.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

我不确定是什么问题。欢迎小贴士。

谢谢

0 个答案:

没有答案