简体   繁体   English

从QPrintSupport上的源错误编译Qt 5.3.1

[英]Compiling Qt 5.3.1 from source error at qprintsupport

I'm not sure whether or not this question has a causality with my previous question . 我不确定这个问题是否与我先前的问题有因果关系。

So, I compiled Qt 5.3.1 from source with MinGW 4.8.2. 因此,我使用MinGW 4.8.2从源代码编译了Qt 5.3.1。 The build stopped at qtbase/src/printsupport directory, as you can see the image below: 生成停止在qtbase/src/printsupport目录,如您所见,如下图所示:

error: enumeration value 'PPK_CustomBase' not handled in switch

Is it a bug or something at qtbase/src/printsupport/kernel/qprintengine_win.cpp file? qtbase/src/printsupport/kernel/qprintengine_win.cpp文件中的bug还是其他东西? Then, should I just report it to the developer? 然后,我是否应该向开发人员报告?

Look here it give you a hint. 这里给你一个提示。 Probably somewhere you use this key -Werror in make files implicitly or explicitly when start compilation with gcc. 在开始使用gcc进行编译时,可能在隐式或显式的make文件中使用此-Werror键。 If I correct understand error in that switch operation must be default: statement or case PPK_CustomBase: statement. 如果我正确理解,则该开关操作中的错误必须是default:语句或case PPK_CustomBase:语句。

miraiE, miraiE,

If you will notice in your output: cc1plus.exe: all warnings being treated as errors This is, as was mentioned before, a warning that is stopping the compile process as an error. 如果您在输出中注意到:cc1plus.exe:所有警告都被视为错误这是如前所述的警告,它正在将编译过程停止为错误。

You should be able to run you configure.bat script again, with the option -no-warnings-are-errors. 您应该能够再次运行configure.bat脚本,并带有-no-warnings-are-errors选项。 Then re-run your make.exe to get past this, and other warnings, from stopping the build. 然后重新运行make.exe,以结束构建过程并避免出现其他警告。

Details of the specific configure options below: 以下特定配置选项的详细信息:

../qtbase-opensource-src-5.3.1/configure --help |grep -i warn ../qtbase-opensource-src-5.3.1/configure --help | grep -i警告

-silent ............ Reduce the build output so that warnings and errors -silent ............减少构建输出,以免出现警告和错误

-no-warnings-are-errors Make warnings be treated normally -no-warnings-are-errors正常处理警告

-warnings-are-errors Make warnings be treated as errors -warnings-are-errors将警告视为错误

I hope this helps! 我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM