1.资源下载
Qt下载:https://download.qt.io/new_archive/qt/
LibreCAD源码:https://github.com/LibreCAD/LibreCAD
VS2015 Qt插件安装: Tools->Extensions and Updates...->Online 搜索 “Qt” , 下载安装 “qt-vs-tools-msvc2015”
2.VS打开LibreCAD
Error1:
/LibreCAD-master/librecad/src/boost.pri:136: exists(file) requires one argument.
Project ERROR: Can not find Boost installation in /boost/boost_1_53_0
解决方法:
1.打开LibreCAD-master/librecad/src/boost.pri,将第136行的boost路径改为自己安装的boost路径
2.添加系统环境变量 BOOST_DIR = “自己安装的boost路径”
重新使用VS打开librecad.pro
3.编译
Error1:
rs.h/ jwwdoc.h/jwwdoc.cpp/dl_jww.cpp: warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
打开依次rs.h/ jwwdoc.h/jwwdoc.cpp/dl_jww.cpp文件,全选, file->advanced svae options
Error2: Project ERROR: Cannot run compiler 'cl'. Output...
缺少环境变量,需要将“C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin”到系统变量下的"path“中
Error3:无法打开generated files/qrc_icons.cpp,文件不存在
手动编译 icons.qrc
1.将D:\Qt\Qt5.14.0\5.14.0\msvc2015_64\bin 添加到环境变量
2.运行CMD, cd到icons.qrc目录下,即LibreCAD-master\librecad\res\icons
3.输入命令 rcc icons.qrc –o qrc_icons.cpp