简体   繁体   English

提升json_parser依赖性

[英]boost json_parser dependencies

I want to use boost's json_parser for reading json data and I'm trying to figure out the dependencies I need. 我想使用boost的json_parser来读取json数据,并且试图找出所需的依赖项。 I run bcp on 'boost\\property_tree\\detail\\json_parser\\read.hpp' and it extracted a bunch of headers along with two cpp files 'smart_ptr/src/sp_collector.cpp' and 'smart_ptr/src/sp_debug_hooks.cpp'. 我在'boost \\ property_tree \\ detail \\ json_parser \\ read.hpp'上运行bcp,它提取了一堆标题以及两个cpp文件'smart_ptr / src / sp_collector.cpp'和'smart_ptr / src / sp_debug_hooks.cpp'。

The question is - do I need those? 问题是-我需要那些吗? I successfully built my project without compiling those two files only with the headers and json_parser worked. 我成功地构建了我的项目,而无需仅使用标头和json_parser编译这两个文件。 However I'm not sure about the implications and any code paths that would lead to errors during runtime. 但是,我不确定运行时会导致错误的含义和任何代码路径。 Boost's documentation sometimes lists dependencies for different parts of the library but I didn't find it for property tree under http://www.boost.org/doc/libs/1_59_0/doc/html/property_tree.html Boost的文档有时会列出库的不同部分的依赖关系,但我在http://www.boost.org/doc/libs/1_59_0/doc/html/property_tree.html下的属性树中找不到它

If your application linked, then obviously the symbols defined in these translation units are not used. 如果您的应用程序已链接,则显然未使用这些转换单元中定义的符号。

I suppose the dependency analysis just tracks which libraries are used, and that pulls in Boost Smart Pointers , including the compiled part(s). 我想依赖性分析仅跟踪使用了哪些库,并且提取了Boost Smart Pointers (包括已编译的部分)。

However I'm not sure about the implications and any code paths that would lead to errors during runtime 但是我不确定会导致运行时错误的含义和任何代码路径

Barring the use of shady dynamic symbol resolution things that are implementation specific, you don't have such worries. 除非使用特定于实现的可疑动态符号解析功能,否则您无需担心。 I think you're safe because you're not using the refcounted garbage collector that's suported in those TUs. 我认为您很安全,因为您没有使用那些TU中支持的refcounted垃圾收集器。

If you enable the smart pointer debugging hooks, then linking will fail. 如果启用智能指针调试挂钩,则链接将失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM