添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
霸气的花卷  ·  python ...·  2 年前    · 

使用jsoncpp出现,json_test.cpp:(.text+0x2c): undefined reference to `Json::Value::Value(Json::ValueType)问

缥缈峰虚竹

使用jsoncpp出现,json_test.cpp:(.text+0x2c): undefined reference to `Json::Value::Value(Json::ValueType)问

问题描述

使用jsoncpp出现,json_test.cpp:(.text+0x2c): undefined reference to `Json::Value::Value(Json::ValueType)问题

nvidia@nvidia-desktop:~/Desktop/work/c_project$ g++ json_test.cpp -o json_test
/tmp/ccrEc2Of.o: In function ​​ ​parseJson()': json_test.cpp:(.text+0x2c): undefined reference to ​ ​​Json::Value::Value(Json::ValueType)’
json_test.cpp:(.text+0x38): undefined reference to ​​ ​Json::Value::Value(Json::ValueType)' json_test.cpp:(.text+0x44): undefined reference to ​ ​​Json::Value::Value(Json::ValueType)’
json_test.cpp:(.text+0x68): undefined reference to ​​ ​Json::CharReaderBuilder::CharReaderBuilder()' json_test.cpp:(.text+0x90): undefined reference to ​ ​​Json::CharReaderBuilder::operator[](std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)’
json_test.cpp:(.text+0xa0): undefined reference to ​​ ​Json::Value::Value(bool)' json_test.cpp:(.text+0xb0): undefined reference to ​ ​​Json::Value::operator=(Json::Value&&)’
json_test.cpp:(.text+0xb8): undefined reference to ​​ ​Json::Value::~Value()' json_test.cpp:(.text+0xe4): undefined reference to ​ ​Json::parseFromStream(Json::CharReader::Factory const&, std::istream&, Json::Value*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > )’
json_test.cpp:(.text+0x150): undefined reference to ​ ​Json::Value::operator[](char const*)' json_test.cpp:(.text+0x164): undefined reference to ​ ​Json::Value::asString​ ​abi:cxx11​ ​ const’
json_test.cpp:(.text+0x1bc): undefined reference to ​ ​Json::Value::operator[](char const*)' json_test.cpp:(.text+0x1c0): undefined reference to ​ ​Json::Value::asInt() const’
json_test.cpp:(.text+0x1f4): undefined reference to ​ ​Json::Value::operator[](char const*)' json_test.cpp:(.text+0x200): undefined reference to ​ ​Json::Value::operator=(Json::Value const&)’
json_test.cpp:(.text+0x220): undefined reference to ​ ​Json::Value::size() const' json_test.cpp:(.text+0x248): undefined reference to ​ ​Json::Value::operator’
json_test.cpp:(.text+0x258): undefined reference to ​ ​Json::operator<<(std::ostream&, Json::Value const&)' json_test.cpp:(.text+0x2a4): undefined reference to ​ ​Json::Value::operator[](char const
)’
json_test.cpp:(.text+0x2b0): undefined reference to ​​ ​Json::Value::operator=(Json::Value const&)' json_test.cpp:(.text+0x2d8): undefined reference to ​ ​​Json::Value::operator[](char const*)’
json_test.cpp:(.text+0x2ec): undefined reference to ​​ ​Json::Value::asString[abi:cxx11]() const' json_test.cpp:(.text+0x344): undefined reference to ​ ​​Json::Value::operator[](char const*)’
json_test.cpp:(.text+0x358): undefined reference to ​​ ​Json::Value::asString[abi:cxx11]() const' json_test.cpp:(.text+0x39c): undefined reference to ​ ​​Json::CharReaderBuilder::~CharReaderBuilder()’
json_test.cpp:(.text+0x3ac): undefined reference to ​​ ​Json::Value::~Value()' json_test.cpp:(.text+0x3b4): undefined reference to ​ ​​Json::Value::~Value()’
json_test.cpp:(.text+0x3bc): undefined reference to ​​ ​Json::Value::~Value()' json_test.cpp:(.text+0x444): undefined reference to ​ ​​Json::CharReaderBuilder::~CharReaderBuilder()’
json_test.cpp:(.text+0x464): undefined reference to ​​ ​Json::Value::~Value()' json_test.cpp:(.text+0x474): undefined reference to ​ ​​Json::Value::~Value()’
json_test.cpp:(.text+0x484): undefined reference to `Json::Value::~Value()

问题分析

libjsoncpp.a库没有正确链接。

解决办法

g++ json_test.cpp -o json_test -L/usr/local/lib /usr/local/lib/libjsoncpp.a

MySQL:Data truncation: Invalid JSON text: “Invalid value.“ at position 1 in value for column

sition 1 in value for column

python list选取多个位置元素 python list取第几个元素

List是python的基本数据类型之一 当成基本数组的赋值以及访问 注意list[2]表示访问列表第三个元素,list[-2]表示访问的是列表倒数第二个元素list[1:]表示从第二个列表元素开始截取列表list1=[1,2,3,4] list2=["cnm","fuck you","nmsl"] print(list1)#输出[1,2,3,4] print(list1[0

R语言已知卡方求P r语言卡方分析

题目:常用统计分析中的7大类型:描述统计、频数表分析、方差分析、t检验、卡方检验、线性回归、相关分析。1、描述统计data=mtcars summary(object = data['disp'],digits = 7) summary(object = data['mpg'],digits = 7) summary(object = data['cyl'],digits = 7)结果: 2、频数