C++でJSONしようと思う。
CentOS5.2でjsoncppにトライ。
参考URL:
http://jsoncpp.sourceforge.net/index.html
1.jsoncppをDL
2.scons-localをDL
→エラーがでた。
[hogehoge@localhost jsoncpp]$ python scons.py platform=linux-gcc check
scons: Reading SConscript files ...
Using platform 'linux-gcc-4.1.2'
LD_LIBRARY_PATH = :libs/linux-gcc-4.1.2
Building using PLATFORM = linux-gcc-4.1.2
scons: done reading SConscript files.
scons: Building targets ...
RunJSONTests("[<SCons.Node.FS.File instance at 0xb79df70c>]")
scons: *** [check] AttributeError : 'list' object has no attribute 'startswith'
Traceback (most recent call last):
File "/home/yamamoto/jsoncpp/trunk/jsoncpp/scons-local-1.2.0.d20090223/SCons/Action.py", line 1041, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File "/home/yamamoto/jsoncpp/trunk/jsoncpp/scons-local-1.2.0.d20090223/SCons/Action.py", line 1205, in __call__
return apply(self.parent.actfunc, args, kw)
File "/home/yamamoto/jsoncpp/trunk/jsoncpp/SConstruct", line 235, in runJSONTests_action
return runjsontests.runAllTests( os.path.abspath(source), jsontest_path )
File "/usr/lib/python2.4/posixpath.py", line 403, in abspath
if not isabs(path):
File "/usr/lib/python2.4/posixpath.py", line 49, in isabs
return s.startswith('/')
AttributeError: 'list' object has no attribute 'startswith'
scons: building terminated because of error
s.
どうもjsoncpp側の不備のようだが、scons-localのバージョンを1.2.0.d20090113、1.1.0 と落として再試行を繰り返すけどだめ
jsoncppはRevison69
Pythonは2.4.3
jsconcppのRevison68を試してもだめ。Python2.6.2にしても余計だめでした。ん~。パスしよう。
PR