下载 QScintilla
https://riverbankcomputing.com/software/qscintilla/download
修改支持debug
修改qscintilla.pro
TEMPLATE = lib
+ Debug: TARGET = qscintilla2d
+ Release: TARGET = qscintilla2
编译
- 在开始菜单 打开
Qt Command Prompt
- 切换到目录
cd ./Qt4Qt5
- 生成makefile文件
qmake qscintilla.pro
- 编译
nmake all
安装
nmake install
问题解决
- 找不到
nmake
,通过vs2013的命令行工具切换过去 make
失败,报错:Makefile.Release:822: *** missing separator. Stop.
这是一个大坑,修改所有的>> 为 \t>> 如,用vim:%s/^<</\t<</g
改后冒出其他错误,最后只能使用nmake编译
可以指定spec参数使用其他的编译器编译,如:
qmake qscintilla.pro -spec D:\QT\5.7\msvc2013\mkspecs\win32-msvc2013
window下修改
将拷贝到\5.7\msvc2013\lib\
下的dll,pdb文件拷贝到\5.7\msvc2013\bin\
目录下
也可以修改Makefile.Release和Makefile.Debug的install_target部分
使用
在pro文件里加入 CONFIG += qscintilla2
自动加入
features/qscintilla2.prf
内容
编译designer
cd ./designer-Qt4Qt5
qmake designer.pro
nmake
nmake install
没必要编译debug版本,因为designer下全是release版,无debug版
扫描二维码关注公众号,回复: 2480927 查看本文章
例子编译
cd ./example-Qt4Qt5
qmake application.pro
nmake all
然后在debug和release下运行application.exe查看效果
参考
https://my.oschina.net/u/2306127/blog/371479
http://blog.sina.com.cn/s/blog_62a5d6330100s0kr.html
https://zhidao.baidu.com/question/554099725098626812.html
http://blog.csdn.net/zhaoyongCNSX/article/details/52207217
http://stackoverflow.com/questions/36439535/building-qscintilla-on-windows-fails
http://stackoverflow.com/questions/10448555/missing-separator-error-in-makefile