gcc/g++ 链接库的编译与链接 -lxerces-c
https://www.cnblogs.com/jadeshu/articles/10663512.html
#include <xercesc/util/PlatformUtils.hpp>
// Other include files, declarations, and non-Xerces-C++ initializations.
using namespace xercesc;
int main(int argc, char* argv[])
{
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch) {
// Do your failure processing here
return 1;
}
// Do your actual work with Xerces-C++ here.
XMLPlatformUtils::Terminate();
// Other terminations and cleanup.
return 0;
}
freebsd 编译 xerces-c
cmake .. -Dtranscoder=icu
c++ main.cpp -I/usr/local/include -L/usr/local/lib -lxerces-c

浙公网安备 33010602011771号