Open GoogleCodeExporter opened 9 years ago
我这里无法编译:
g++ -o src/ime-core/imi_plugin.os -c -march=x86-64 -mtune=generic -O2 -pipe
-DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/lib/sunpinyin/data"' -fPIC -I.
-Isrc -Isrc/slm -Isrc/slm/tslmpack -Isrc/slm/tslminfo -Isrc/slm/tslmendian
-Isrc/slm/tools -Isrc/slm/thread -Isrc/slm/slmseg -Isrc/slm/slmprune
-Isrc/slm/slminfo -Isrc/slm/slmbuild -Isrc/slm/mmseg -Isrc/slm/ids2ngram
-Isrc/slm/getWordFreq -Isrc/pinyin -Isrc/lexicon -Isrc/ime-core
-I/usr/include/python3.2mu src/ime-core/imi_plugin.cpp
src/ime-core/imi_plugin.cpp: In constructor
‘CIMIPythonPlugin::CIMIPythonPlugin(std::string)’:
src/ime-core/imi_plugin.cpp:102:46: error: ‘PyString_Check’ was not
declared in this scope
src/ime-core/imi_plugin.cpp:103:40: error: ‘PyString_AsString’ was not
declared in this scope
src/ime-core/imi_plugin.cpp:105:50: error: ‘PyString_Check’ was not
declared in this scope
src/ime-core/imi_plugin.cpp:106:44: error: ‘PyString_AsString’ was not
declared in this scope
src/ime-core/imi_plugin.cpp:108:60: error: ‘PyString_Check’ was not
declared in this scope
src/ime-core/imi_plugin.cpp:109:54: error: ‘PyString_AsString’ was not
declared in this scope
src/ime-core/imi_plugin.cpp: In function ‘wstring
PyUnicode_AsWString(PyObject*)’:
src/ime-core/imi_plugin.cpp:151:60: error: cannot convert
‘PyUnicodeObject*’ to ‘PyObject* {aka _object*}’ for argument ‘1’
to ‘Py_ssize_t PyUnicodeUCS4_AsWideChar(PyObject*, wchar_t*, Py_ssize_t)’
src/ime-core/imi_plugin.cpp: In member function ‘virtual TPluginCandidates
CIMIPythonPlugin::provide_candidates(const TPluginPreedit&, int*)’:
src/ime-core/imi_plugin.cpp:178:35: error: ‘PyInt_Check’ was not declared
in this scope
src/ime-core/imi_plugin.cpp:179:47: error: ‘PyInt_AsLong’ was not declared
in this scope
src/ime-core/imi_plugin.cpp:195:75: error: ‘PyInt_AsLong’ was not declared
in this scope
src/ime-core/imi_plugin.cpp: In member function ‘virtual TPluginCandidate
CIMIPythonPlugin::translate_candidate(const TPluginCandidate&, int*)’:
src/ime-core/imi_plugin.cpp:221:35: error: ‘PyInt_Check’ was not declared
in this scope
src/ime-core/imi_plugin.cpp:222:47: error: ‘PyInt_AsLong’ was not declared
in this scope
scons: *** [src/ime-core/imi_plugin.os] Error 1
scons: building terminated because of errors.
==> ERROR: A failure occurred in build().
Aborting...
Original comment by felixonm...@gmail.com
on 25 Jul 2011 at 2:43
你用的Python3的环境吧?把那个SConstruct那个文件中的Python改成python2。可以在PKGBUILD里面修改。
Original comment by yuano...@gmail.com
on 25 Jul 2011 at 2:48
去把 Arch 里的默认 python 由 python3 改回 python2
Original comment by jhuangjiahua@gmail.com
on 25 Jul 2011 at 7:57
Original issue reported on code.google.com by
yuano...@gmail.com
on 24 Jul 2011 at 12:25