windows VS2013 編譯安裝QWT6.1和QWTPolar1.1.1


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. 文件配置方式同上
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM