vs2005下使用plistcpp开源库解决思路
vs2005下使用plistcpp开源库
windows vs2005下怎么使用plistcpp的开源库,我按照README的做,把整个include文件夹拷贝到我工程下,在工程中添加文件plist.hpp, plistdate.hpp, plist.cpp plistdate.cpp, 在vs2005的设置上已经添加相应的目录引用,include,include/boost, include/untilTest++
然后在代码头文件中添加
include "plist.hpp"
include "plistdate.hpp"
using namespace plist;
在函数中添加
std::map<std::string, boost::any> dict;
Plist::readPlist("config.plist", dict);
然后编译,就出现了120个错误,2个警告
1>plist.hpp(44) : error C2146: syntax error : missing ';' before identifier 'integer_type'
1>plist.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>base64.hpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>plist.cpp(40) : error C2065: 'int32_t' : undeclared identifier
1>plist.cpp(42) : error C2146: syntax error : missing ';' before identifier '_offsetByteSize'
1>plist.cpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(45) : error C2146: syntax error : missing ';' before identifier '_objRefSize'
1>plist.cpp(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(46) : error C2146: syntax error : missing ';' before identifier '_refCount'
1>plist.cpp(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(131) : error C2146: syntax error : missing ';' before identifier 'getCount'
1>plist.cpp(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C2146: syntax error : missing ';' before identifier 'x'
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C2146: syntax error : missing ';' before identifier 'c'
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(151) : error C2039: 'x' : is not a member of 'Plist::hostLittleEndian::<unnamed-tag>'
1> plist.cpp(150) : see declaration of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(152) : error C2039: 'c' : is not a member of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(150) : see declaration of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(174) : error C2974: 'Plist::writeXMLSimpleNode' : invalid template argument for 'T', type expected
1>plist.cpp(86) : see declaration of 'Plist::writeXMLSimpleNode'
1>plist.cpp(265) : error C2039: '_refCount' : is not a member of 'Plist::PlistHelperData'
1>plist.cpp(36) : see declaration of 'Plist::PlistHelperData'
1>plist.cpp(267) : error C2039: '_objRefSize' : is not a member of 'Plist::PlistHelperData'
1>plist.cpp(36) : see declaration of 'Plist::PlistHelperData'
1>plist.cpp(267) : error C2039: '_refCount' : is not a member of 'Plist::PlistHelperData'
windows vs2005下怎么使用plistcpp的开源库,我按照README的做,把整个include文件夹拷贝到我工程下,在工程中添加文件plist.hpp, plistdate.hpp, plist.cpp plistdate.cpp, 在vs2005的设置上已经添加相应的目录引用,include,include/boost, include/untilTest++
然后在代码头文件中添加
include "plist.hpp"
include "plistdate.hpp"
using namespace plist;
在函数中添加
std::map<std::string, boost::any> dict;
Plist::readPlist("config.plist", dict);
然后编译,就出现了120个错误,2个警告
1>plist.hpp(44) : error C2146: syntax error : missing ';' before identifier 'integer_type'
1>plist.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.hpp(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>base64.hpp : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>plist.cpp(40) : error C2065: 'int32_t' : undeclared identifier
1>plist.cpp(42) : error C2146: syntax error : missing ';' before identifier '_offsetByteSize'
1>plist.cpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(45) : error C2146: syntax error : missing ';' before identifier '_objRefSize'
1>plist.cpp(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(45) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(46) : error C2146: syntax error : missing ';' before identifier '_refCount'
1>plist.cpp(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(46) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(131) : error C2146: syntax error : missing ';' before identifier 'getCount'
1>plist.cpp(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C2146: syntax error : missing ';' before identifier 'x'
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C2146: syntax error : missing ';' before identifier 'c'
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(150) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>plist.cpp(151) : error C2039: 'x' : is not a member of 'Plist::hostLittleEndian::<unnamed-tag>'
1> plist.cpp(150) : see declaration of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(152) : error C2039: 'c' : is not a member of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(150) : see declaration of 'Plist::hostLittleEndian::<unnamed-tag>'
1>plist.cpp(174) : error C2974: 'Plist::writeXMLSimpleNode' : invalid template argument for 'T', type expected
1>plist.cpp(86) : see declaration of 'Plist::writeXMLSimpleNode'
1>plist.cpp(265) : error C2039: '_refCount' : is not a member of 'Plist::PlistHelperData'
1>plist.cpp(36) : see declaration of 'Plist::PlistHelperData'
1>plist.cpp(267) : error C2039: '_objRefSize' : is not a member of 'Plist::PlistHelperData'
1>plist.cpp(36) : see declaration of 'Plist::PlistHelperData'
1>plist.cpp(267) : error C2039: '_refCount' : is not a member of 'Plist::PlistHelperData'