编译时Qt Cygwin / g ++ Makefile错误

时间:2016-05-29 17:39:16

标签: qt makefile cmake g++ cygwin

您好我正在尝试让Qt使用Visual Studio 2015社区版,当我转到命令提示符并使用以下命令c:\ Qt \ 5.6.0 \ qbase \ configure时出现以下难看的错误:

Creating qmake...
g++ -c -o project.o -DUNICODE -ffunction-sections -g  -

IC:\Qt\5.6.0\qtbase/qmake -IC:\Qt\5.6.0\qtbase/qmake/library -IC:\Qt\5.6.0\qtbase/qmake/generators -IC:\Qt\5.6.0\qtbase/qmake/generators/unix -IC:\Qt\5.6.0\qtbase/qmake/generators/win32 -IC:\Qt\5.6.0\qtbase/qmake/generators/mac -IC:\Qt\5.6.0\qtbase/qmake/generators/integrity -IC:\Qt\5.6.0\qtbase\include -IC:\Qt\5.6.0\qtbase\include/QtCore -IC:\Qt\5.6.0\qtbase\include/QtCore/5.6.0 -IC:\Qt\5.6.0\qtbase\include/QtCore/5.6.0/QtCore -I../src/corelib/global -DHAVE_QCONFIG_CPP -IC:\Qt\5.6.0\qtbase\mkspecs\win32-g++ -IC:\Qt\5.6.0\qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS C:\Qt\5.6.0\qtbase/qmake/project.cpp
    g++: error: spawn: Exec format error
    Makefile:202: recipe for target 'project.o' failed
    mingw32-make: *** [project.o] Error 1
    rm -f project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o cesdkhandler.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qringbuffer.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o 

qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o qsettings_win.o qsystemlibrary.o registry.o
    g++ -c -o project.o -DUNICODE -ffunction-sections -g  -IC:\Qt\5.6.0\qtbase/qmake -IC:\Qt\5.6.0\qtbase/qmake/library -IC:\Qt\5.6.0\qtbase/qmake/generators -IC:\Qt\5.6.0\qtbase/qmake/generators/unix -IC:\Qt\5.6.0\qtbase/qmake/generators/win32 -IC:\Qt\5.6.0\qtbase/qmake/generators/mac -IC:\Qt\5.6.0\qtbase/qmake/generators/integrity -IC:\Qt\5.6.0\qtbase\include -IC:\Qt\5.6.0\qtbase\include/QtCore -IC:\Qt\5.6.0\qtbase\include/QtCore/5.6.0 -IC:\Qt\5.6.0\qtbase\include/QtCore/5.6.0/QtCore -I../src/corelib/global -DHAVE_QCONFIG_CPP -IC:\Qt\5.6.0\qtbase\mkspecs\win32-g++ -IC:\Qt\5.6.0\qtbase/tools/shared -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DPROEVALUATOR_FULL -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_JSON_READONLY -DQT_NO_STANDARDPATHS C:\Qt\5.6.0\qtbase/qmake/project.cpp
    g++: error: spawn: Exec format error
Makefile:202: recipe for target 'project.o' failed
mingw32-make: *** [project.o] Error 1
Building qmake failed, return code 2
On a related note when I just run Qt it will not compile anything also. 

谢谢大家!!!!

0 个答案:

没有答案