Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsoncpp 依赖问题 #3

Open
wangeasy6 opened this issue Jul 25, 2018 · 2 comments
Open

jsoncpp 依赖问题 #3

wangeasy6 opened this issue Jul 25, 2018 · 2 comments

Comments

@wangeasy6
Copy link

使用 树莓派3B+,执行:sudo sh ./install_source.sh 步骤的时候,出现下面这个错误:

g++ -o pihome src/main.o src/service.o src/func/inifile.o src/device/serial.o src/service/applicationservice.o src/service/nasservice.o src/service/servicebase.o src/service/statusservice.o src/connect/baseserver.o src/connect/connectclient.o src/connect/cyclicserver.o src/connect/epollserver.o src/connect/threadserver.o src/connect/udpserver.o -ljsoncpp -lpthread -ldl
src/service/nasservice.o: In function `NasService::Start(Json::Value*, Json::Value*)':
/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/nasservice.cpp:35: undefined reference to `Json::Value::operator=(Json::Value const&)'
/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/nasservice.cpp:37: undefined reference to `Json::Value::operator=(Json::Value const&)'
src/service/statusservice.o: In function `StatusService::Start(Json::Value*, Json::Value*)':
/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/statusservice.cpp:184: undefined reference to `Json::Value::operator=(Json::Value const&)'
/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/statusservice.cpp:185: undefined reference to `Json::Value::operator=(Json::Value const&)'
/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/statusservice.cpp:186: undefined reference to `Json::Value::operator=(Json::Value const&)'
src/service/statusservice.o:/home/pi/Code/web/PiBox-master/PiBox/CppClient/src/service/statusservice.cpp:187: more undefined references to `Json::Value::operator=(Json::Value const&)' follow
collect2: error: ld returned 1 exit status
scons: *** [pihome] Error 1
scons: building terminated because of errors.
error!

我查到的是说 jsoncpp 编译的版本不对,但是我 apt安装 源码安装 都试过了,还是没有解决。
问一下LZ有没有遇到过这个问题?有没有什么解决办法?

@wzyy2
Copy link
Owner

wzyy2 commented Jul 25, 2018

jsoncpp的版本不对导致。。

我这个是4年前弄的,那时候树莓派用的应该是debian Wheezy, jsoncpp的版本应该是0.6
https://packages.debian.org/wheezy/libjsoncpp-dev

@rRiInNgG
Copy link

rRiInNgG commented Jun 2, 2019

所以有解决方案吗,初学者。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants