我的环境:
QT: Qt_5_0_2
QWT: qwt-6.1-rc3
MinGW: mingw47_32
OS: win7_32
我遵循介绍文件"INSTALL"的步骤:
C) Win32/MinGW
Check that your Qt version has been built with MinGW - not with MSVC !
Start a Shell, where Qt4 is initialized. ( F.e. with
"Programs->Qt by Trolltech ...->Qt 4.x.x Command Prompt" ).
Check if you can execute "make" or something like "mingw32-make".
qmake qwt.pro
make
make install
我在步骤"制作"中得到错误:
C:qwt-6.1-rc3>qmake qwt.pro
C:qwt-6.1-rc3>mingw32-make
cd src && ( if not exist Makefile E:Qt5.0.25.0.2mingw47_32binqmake.exe C:
qwt-6.1-rc3srcsrc.pro -o Makefile ) && mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/qwt-6.1-rc3/src'
mingw32-make -f Makefile.Release all
mingw32-make[2]: Entering directory 'C:/qwt-6.1-rc3/src'
Makefile.Release:305: *** missing separator. Stop.
mingw32-make[2]: Leaving directory 'C:/qwt-6.1-rc3/src'
Makefile:40: recipe for target 'release-all' failed
mingw32-make[1]: *** [release-all] Error 2
mingw32-make[1]: Leaving directory 'C:/qwt-6.1-rc3/src'
makefile:44: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make: *** [sub-src-make_first-ordered] Error 2
"Makefile.Release"中的304305行是:
304 qmake: FORCE
305 @$(QMAKE) -o Makefile.Release src.pro
哪里出了问题?
感谢
Makefile.Release:305: *** missing separator. Stop.
这通常意味着该Makefile
不是mingw32-make
的正确格式;
由于Makefile
是由qmake
生成的,因此您应该检查qmake
的QMAKESPEC
。它应该是win32-g++
,而不是win32-mvsc
。
此问题与qwt
INSTALL的第一个警告密切相关注意:
检查你的Qt版本是用MinGW构建的,而不是用MSVC!
猜测您损坏的Makefile是以前尝试的遗留文件-完全删除Qwt构建目录,然后从头开始。
为了在Qt创建者中加载Qwt设计器插件,您需要有一个与创建者的构建方式兼容的版本。AFAIR 5.0.2 mingw包包含创建者的2.7.0版本,该版本是用MSVC为Qt 4.8构建的(请参阅关于->Qt创建者(。如果是真的,这意味着你需要有两个不同的Qwt版本——一个用于你的应用程序,另一个用于设计器插件。
对于未来,我计划提供与Qt创建者的当前二进制包兼容的设计器插件的预编译版本。
还要注意的是,在SVN trunk中,自rc3以来,构建插件的默认设置已经更改:在windows上,库静态链接到插件中,而在更好的系统上,在库的安装路径中编译也会产生类似的效果(请参阅RPATH(。
我也遇到了同样的问题。原因是我想第二次准备消息来源。我在svn floder有消息来源。我解决了擦除文件夹和再次更新源的问题。在这个操作之后,我能够正确地运行"qmake-proj.pro"。