错误:输入(3)中的语法错误。使用typedef' d时

时间:2015-02-15 18:27:52

标签: c++ swig

使用swig和go:

时出现此错误
root@linux:~/go/src/kytea# go build
# kytea
/root/go/kyteagit/src/include/kytea/string-util.h:36: Error: Syntax error in input(3).

项目是this one。有问题的一行是:

[...]
27    namespace kytea {
28    
29    // a class for turning std::strings into internal representation
30    class StringUtil {
31    
32    public:
33    
34        // types of characters (set in the constructor)
35        typedef char CharType;
36        const static CharType KANJI    = 'K';
37        const static CharType KATAKANA = 'T';
38        const static CharType HIRAGANA = 'H';
39        const static CharType ROMAJI   = 'R';
40        const static CharType DIGIT    = 'D';
41        const static CharType OTHER    = 'O';
[...]

基于swig的其他类似问题我猜测它与swig无法解析该行有关,如何在不更改源代码的情况下纠正此问题?

0 个答案:

没有答案