zl程序教程

您现在的位置是:首页 >  系统

当前栏目

windows VS2013 编译安装QWT6.1和QWTPolar1.1.1

Windows安装 编译 vs2013
2023-09-11 14:19:34 时间

QWT的编译和配置

1. 下载QWT从官网

For getting a snapshot with all bugfixes for the latest 5.2 release:

svn export svn://svn.code.sf.net/p/qwt/code/branches/qwt-5.2 

For getting a snapshot with all bugfixes for the latest 6.1 release:

svn export svn://svn.code.sf.net/p/qwt/code/branches/qwt-6.1 

2. 利用visual studio 2013打开qwt.pro工程,编译时候出现问题

Moc’ing qwt_abstract_legend.h…命令语法不正确。error MSB6006: “cmd.exe”已退出,代码为 255。

3.关闭项目,打开文件 qwt.vcxproj 和 qwt_designer_plugin.vcxproj,将所有的 “ %40echo moc .* && ”文件删除,或者使用另外一种方式There was a bug in the Visual Studio add-in when using subdirs. Try to change this in the qwt.pro file before importing:

SUBDIRS = \ 
    src \
    textengines 

修改成为

SUBDIRS = src textengines

Then, do the import again. You could also use a fixed version of the Visual Studio add-in. Here you can find the corresponding issue on the Qt bug tracker: Qt Visual Studio Add-in 1.1.0 doesn't parse QTDIR correctly in a project with SUBDIRs

但是测试时候发现直接修改次级目录的方式还是不能使用,或许安装Visual studio add-in 插件有效,但是我直接删除了里面的  %40echo moc .* && 

4. 编译之后,进行配置

5.配置
1. 将lib目录下的qwtd.dll、qwt.dll拷贝到$(QTDIR)/bin和$(QTDIR)/lib目录下
2. 将designer\plugins\designer目录下的qwt_designer_plugin.dll和qwt_designer_plugin.lib拷贝到$(QTDIR)\plugins\designer目录下。
3. 将src目录下的所有.h和.cpp放入一个空文件夹QWT中,再将该文件夹拷贝到$(QTDIR)\include目录下。

QWTPolar的编译和配置

由于QWTPolar的构建依赖于QWT,所以必须先将QWT配置好之后可以编译、链接。

1. 官网下载QWTPolar

2. VS2013打开.pro文件,添加QWT头文件和库目录,并将Debug版本qwtd.lib和Release版本qwt.lib添加到相应的配置环境中,必须对照好,不然编译的example程序不能运行。

3. 编译过程中也会报相同的错误

error MSB6006: “cmd.exe”已退出,代码为 255。
 解决方式同上
4. 文件配置方式同上