如何将CodeSynthesis XSD包含到自己的应用程序中
How to include CodeSynthesis-XSD into own application?
1.(我如何将CodeSynthesis XSD代码生成包含到我的应用程序中,这样当我将应用程序(Visual Studio 10中的QT(交给其他人时,他就不需要安装CodeSynthesis?
2.(如何指定.cpp
和.h
文件的输出目录?xsd help
没有列出这样的选项?我用树生成如下:
>xsd cxx-tree "C:scheme.xsd"
->在执行xsd之前通过"cd"(更改目录(解决
3.(我收到了不知道如何解决的警告:
warning F002: attribute 'value' is implicitly of anySimpleType
info: did you forget to specify 'type' attribute?
warning T004: generating parsing functions for 18 global elements
info: use --root-element-* options to specify document root(s)
是否有未在xsd help
中列出的其他参数?
-
运行时库(libxsd(只是头,所以如果您以编译的形式提供软件,那么最终用户就不需要安装它
-
使用
--output-dir
选项
erik@ubuntu:~$ xsdcxx help cxx-tree 2>&1 | grep -A1 output-dir
--output-dir <dir> Write generated files to <dir> instead of current
directory.
3.关于"警告T004":
erik@ubuntu:~$ xsdcxx help cxx-tree 2>&1 | grep -A1 root-element
--root-element-first Treat only the first global element as a document
root.
--root-element-last Treat only the last global element as a document
root.
--root-element-all Treat all global elements as document roots.
--root-element-none Don't treat any global elements as document roots.
--root-element <element> Treat only <element> as a document root. Repeat
this option to specify more than one root element.
如果您没有指定这些选项中的任何一个,则暗示--root-element-all
,但您将看到"警告T004"。如果--root-element-all
是您想要的,我建议添加该选项以使警告消失。
关于"警告F002":对不起,我不知道。
注意:将来CodeSynthesis XSD将开始将帮助文本打印到stdout时,将不需要"2>&1"。http://codesynthesis.com/pipermail/xsd-users/2012-March/003577.html
关于"警告F002",我们遇到了类似的问题,并发现在未指定具体类型的情况下声明属性时会引发该问题。
相关文章:
- 码头化的C++应用程序是否向后兼容早期的内核版本
- 我想通过带有C++和Python的插件创建一个可扩展的应用程序
- 从运行服务的应用程序代码中提取窗口句柄
- 我的应用程序无法在安卓上使用OpenSSL进行链接
- 如何将独立的 c 应用程序组合到 c++ 应用程序中?
- 像 CPP 中的控制台一样的应用程序
- 我的 c++ 应用程序中的运行时间从 0 增加到 60 太快了(例如一毫秒或一微秒)
- 如何编译使用从不同编译器编译的库的应用程序?
- 设置我的应用程序 API 感知并防止系统使其模糊和错误定位
- 为什么Qt Creator的应用程序输出不能从spdlog记录器打印
- 在发布模式下启动使用库的静态链接编译的应用程序时出错
- 是否可以将不同的编译器嵌入到我的应用程序中?
- C++ 无法链接最基本的应用程序
- 在没有Xcode的macOS中开发具有依赖关系的应用程序
- 如何将用户代码合并到我自己的应用程序中?
- 预览一些自己的应用程序
- 如何将CodeSynthesis XSD包含到自己的应用程序中
- 在自己的应用程序中插入具有WebRTC支持的web框架
- 创建层级zlib, libpng和我自己的应用程序
- 如何在vc++中重新启动自己的应用程序