首先,我按照以下步骤安装QScintilla:
1:
cd Qt4Qt5
qmake qscintilla.pro
sudo make
make install
2:
cd ../designer-Qt4Qt5
qmake designer.pro
sudo make
sudo make install
3:
cd ../Python
python3 configure.py --pyqt=PyQt5
sudo make
在这里我遇到了问题:
QAbstractScrollArea: No such file or directory
和问题:
qprinter.h: No such file or directory
继续:
sudo make install
4:
然后我输入以下命令安装eric6:
sudo python3 install.py
但我得到了:
Checking dependencies
Python Version: 3.4.0
Found PyQt5
Sorry,please install QScintilla2 and
its PyQt5/PyQt4 wrapper.Error: /usr/lib/python3/dist-packages/PyQt5/Qsci.so: undefined symbol: _ZTI13QsciScintilla
最佳答案
主要问题是你是连接Qt4而不是Qt5.这就是为什么QAbstractScrollArea和QPrinter标头被报告为缺失的原因,以及为什么以后会得到未定义的符号错误.
原文链接:https://www.f2er.com/linux/439792.htmlQScintilla使用功能文件来控制编译时配置,需要修补其源代码以获得Qt5的良好构建.
因此,首先解压缩一组新的源,然后进行以下更改:
设计师Qt4Qt5 / designer.pro:
TARGET = qscintillaplugin_qt5
Qt4Qt5 /功能/ qscintilla2.prf:
} else {
LIBS += -lqscintilla2_qt5
}
}
} else {
LIBS += -lqscintilla2_qt5
}
Qt4Qt5 / qscintilla.pro:
TARGET = qscintilla2_qt5
...
features.path = $$[QT_INSTALL_ARCHDATA]/mkspecs/features
这将确保您获得Qt5的独立qscintilla库.
完成后,请执行以下步骤(作为普通用户):
cd 'path/to/src/Qt4Qt5'
# this is essential for correct linking
export QMAKEFEATURES="$PWD/features"
# make sure you use the right qmake!
qmake-qt5 'qscintilla.pro'
make
# plugin for Qt5 Designer
cd '../designer-Qt4Qt5'
qmake-qt5 'designer.pro' INCLUDEPATH+='../Qt4Qt5' QMAKE_LIBDIR+='../Qt4Qt5'
make
# Python bindings
cd '../Python'
python3 'configure.py' --pyqt='PyQt5' --qmake='/usr/bin/qmake-qt5' \
--qsci-incdir='../Qt4Qt5' --qsci-libdir='../Qt4Qt5'
make
cd 'path/to/src/Qt4Qt5'
make install
cd '../designer-Qt4Qt5'
make install
cd '../Python'
make install