构建qwt-6.1中的错误“缺少分隔符”

时间:2013-05-15 14:27:31

标签: makefile qmake qwt

我的环境:

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

我在“make”步骤中收到错误:

C:\qwt-6.1-rc3>qmake qwt.pro

C:\qwt-6.1-rc3>mingw32-make
cd src\ && ( if not exist Makefile E:\Qt\5.0.2\5.0.2\mingw47_32\bin\qmake.exe C:
\qwt-6.1-rc3\src\src.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”中的 304,305 行是:

304 qmake:  FORCE
305     @$(QMAKE) -o Makefile.Release src.pro

哪里错了?

感谢

3 个答案:

答案 0 :(得分:3)

Makefile.Release:305: *** missing separator.  Stop.

这通常意味着此Makefile格式不适合mingw32-make;

由于Makefile生成qmake,您应该检查QMAKESPEC的{​​{1}}。它应该是qmake,而不是win32-g++

此问题与win32-mvsc INSTALL 注释的第一个警告密切相关:

  

检查您的Qt版本是否已使用MinGW构建 - 而不是使用MSVC!

答案 1 :(得分:1)

猜测你的破坏的Makefile是早期尝试的剩余部分 - 完全删除Qwt构建目录并从头开始。

要在Qt创建者中加载Qwt设计器插件,您需要拥有一个与创建者的构建方式兼容的版本。 AFAIR 5.0.2 mingw软件包包含一个2.7.0版本的创建者,它是为Qt 4.8和MSVC构建的(参见About-> Qt creator)。如果为true,则表示您需要有两个不同的Qwt版本 - 一个用于您的应用程序,另一个用于设计器插件。

对于未来,我计划提供与Qt创建者的当前二进制包兼容的设计器插件的预编译版本。

另请注意,在SVN中继中,构建插件的默认设置已经更改,因为rc3:在windows上,库静态链接到插件中,在更好的系统上,您在库的安装路径中编译时具有类似的效果(见RPATH)。

答案 2 :(得分:0)

我遇到了同样的问题。原因是我想第二次准备消息来源。我在svn floder中有源代码。我解决了问题擦除文件夹并再次更新源。在此操作之后,我能够正确运行'qmake proj.pro'。