我使用CodeSynthesis XSD (C++的)从.xsd文件自动生成.hpp和.cpp文件。但是,当在我的.xsd文件上运行xsd时,我会得到以下错误:
Could not load a transcoding service我使用的是openSUSE Leap-42.2、Xsd 4.0和Apache 3.1.4。以下是详细的信息:
Scanning dependencies of target XSDModel
[ 2%] Generating C++/XML mapping
Could not load a transcoding service
lib/CMakeFiles/XSDModel.dir/build.make:51: recipe for target 'src/model/Model.cpp' failed
make[2]: *** [src/model/Model.cpp] Error 255
CMakeFiles/Makefile2:76: recipe for target 'lib/CMakeFiles/XSDModel.dir/all' failed
make[1]: *** [lib/CMakeFiles/XSDModel.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
[ 2%] Generating C++/XML mapping
Could not load a transcoding service
lib/CMakeFiles/XSDModel.dir/build.make:51: recipe for target 'src/model/Model.cpp' failed
make[2]: *** [src/model/Model.cpp] Error 255
CMakeFiles/Makefile2:76: recipe for target 'lib/CMakeFiles/XSDModel.dir/all' failed
make[1]: *** [lib/CMakeFiles/XSDModel.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2编辑1:,我用--enable-transcoder-gnuiconv交换机构建了Apache,iconv也安装在我的机器上。
编辑2:在深入挖掘之后,我发现linux上的echo $LANG命令打印了一个空行。此外,运行localedef -i en_US -f UTF-8 en_US.UTF-8会打印此错误:
character map file `UTF-8' not found: No such file or directory
cannot read character map directory `/usr/share/i18n/charmaps': No such file or directory发布于 2017-04-07 09:06:47
在这个linux上没有定义任何地区。因此,只需设置一个区域设置:
$ export LANG=en_US.UTF-8之后一切都会好起来的。
https://stackoverflow.com/questions/43141549
复制相似问题