Results 1 to 3 of 3

Thread: Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem

  1. #1
    Join Date
    Mar 2007
    Posts
    29
    Thanks
    2

    Default Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem

    Hi all,
    I'm trying to use qmake to generate the makefile for a simple application and compile it using Mingw make.
    I have just a .cpp file and qmake has generate this .pro file:


    ################################################## ####################
    # Automatically generated by qmake (2.01a) mer 10. ott 10:41:31 2007
    ################################################## ####################

    TEMPLATE = app
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += .

    # Input
    SOURCES += test1.cpp

    If I try to generate makefile with qmake, it produces the following Makefile.Debug:
    ################################################## ###########################
    # Makefile for building: testProject
    # Generated by qmake (2.01a) (Qt 4.3.1) on: mer 10. ott 10:41:36 2007
    # Project: testProject.pro
    # Template: app
    ################################################## ###########################

    ####### Compiler, tools and options

    CC = cl
    CXX = cl
    DEFINES = -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
    CFLAGS = -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -W3 $(DEFINES)
    CXXFLAGS = -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 $(DEFINES)
    INCPATH = -I"..\..\..\..\Qt\4.3.1\include\QtCore" -I"..\..\..\..\Qt\4.3.1\include\QtCore" -I"..\..\..\..\Qt\4.3.1\include\QtGui" -I"..\..\..\..\Qt\4.3.1\include\QtGui" -I"..\..\..\..\Qt\4.3.1\include" -I"." -I"..\..\..\..\Qt\4.3.1\include\ActiveQt" -I"debug" -I"." -I"..\..\..\..\Qt\4.3.1\mkspecs\default"
    LINK = link
    LFLAGS = /LIBPATH:"c:\Qt\4.3.1\lib" /NOLOGO /DEBUG /MANIFESTFILE:"debug\testProject.intermediate.manif est" /SUBSYSTEM:WINDOWS
    LIBS = c:\Qt\4.3.1\lib\qtmaind.lib c:\Qt\4.3.1\lib\QtGuid4.lib c:\Qt\4.3.1\lib\QtCored4.lib
    QMAKE = c:\Qt\4.3.1\bin\qmake
    IDC = c:\Qt\4.3.1\bin\idc.exe
    IDL = midl
    ZIP = zip -r -9
    DEF_FILE =
    RES_FILE =
    COPY = copy /y
    COPY_FILE = $(COPY)
    COPY_DIR = xcopy /s /q /y /i
    DEL_FILE = del
    DEL_DIR = rmdir
    MOVE = move
    CHK_DIR_EXISTS= if not exist
    MKDIR = mkdir
    INSTALL_FILE = $(COPY_FILE)
    INSTALL_PROGRAM = $(COPY_FILE)
    INSTALL_DIR = $(COPY_DIR)

    ####### Output directory

    OBJECTS_DIR = debug

    ####### Files

    SOURCES = test1.cpp
    OBJECTS = debug\test1.obj
    DIST =
    QMAKE_TARGET = testProject
    DESTDIR = debug\ #avoid trailing-slash linebreak
    TARGET = testProject.exe
    DESTDIR_TARGET = debug\testProject.exe

    ####### Implicit rules

    .SUFFIXES: .c .cpp .cc .cxx

    {.}.cpp{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cc{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cxx{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.c{debug\}.obj::
    $(CC) -c $(CFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cpp{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cc{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cxx{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.c{debug\}.obj::
    $(CC) -c $(CFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cpp{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cc{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.cxx{debug\}.obj::
    $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    {.}.c{debug\}.obj::
    $(CC) -c $(CFLAGS) $(INCPATH) -Fodebug\ @<<
    $<
    <<

    ####### Build rules

    first: all
    all: Makefile.Debug $(DESTDIR_TARGET)

    $(DESTDIR_TARGET): $(OBJECTS)
    $(LINK) $(LFLAGS) /OUT:$(DESTDIR_TARGET) @<<
    $(OBJECTS) $(LIBS)
    <<
    mt.exe -nologo -manifest "debug\testProject.intermediate.manifest" -outputresource:$(DESTDIR_TARGET);1



    qmake: FORCE
    @$(QMAKE) -win32 -o Makefile.Debug testProject.pro

    dist:
    $(ZIP) testProject.zip $(SOURCES) $(DIST) testProject.pro ..\..\..\..\Qt\4.3.1\mkspecs\qconfig.pri ..\..\..\..\Qt\4.3.1\mkspecs\features\qt_functions .prf ..\..\..\..\Qt\4.3.1\mkspecs\features\qt_config.pr f ..\..\..\..\Qt\4.3.1\mkspecs\features\exclusive_bu ilds.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\default_pre. prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\defaul t_pre.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\debug.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\debug_and_re lease.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\default_post .prf ..\..\..\..\Qt\4.3.1\mkspecs\features\build_pass.p rf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\rtti.p rf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\except ions.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\stl.pr f ..\..\..\..\Qt\4.3.1\mkspecs\features\shared.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\embed_ manifest_exe.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\embed_ manifest_dll.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\warn_on.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\qt.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\thread .prf ..\..\..\..\Qt\4.3.1\mkspecs\features\moc.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\win32\window s.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\resources.pr f ..\..\..\..\Qt\4.3.1\mkspecs\features\uic.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\yacc.prf ..\..\..\..\Qt\4.3.1\mkspecs\features\lex.prf c:\Qt\4.3.1\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES

    clean: compiler_clean
    -$(DEL_FILE) debug\test1.obj
    -$(DEL_FILE) debug\testProject.intermediate.manifest debug\testProject.exp debug\testProject.pdb debug\testProject.ilk vc*.pdb vc*.idb

    distclean: clean
    -$(DEL_FILE) $(DESTDIR_TARGET)
    -$(DEL_FILE) Makefile.Debug

    mocclean: compiler_moc_header_clean compiler_moc_source_clean

    mocables: compiler_moc_header_make_all compiler_moc_source_make_all

    compiler_moc_header_make_all:
    compiler_moc_header_clean:
    compiler_rcc_make_all:
    compiler_rcc_clean:
    compiler_image_collection_make_all: qmake_image_collection.cpp
    compiler_image_collection_clean:
    -$(DEL_FILE) qmake_image_collection.cpp
    compiler_moc_source_make_all:
    compiler_moc_source_clean:
    compiler_uic_make_all:
    compiler_uic_clean:
    compiler_yacc_decl_make_all:
    compiler_yacc_decl_clean:
    compiler_yacc_impl_make_all:
    compiler_yacc_impl_clean:
    compiler_lex_make_all:
    compiler_lex_clean:
    compiler_clean:



    ####### Compile

    debug\test1.obj: test1.cpp

    ####### Install

    install: FORCE

    uninstall: FORCE

    FORCE:


    As you can see it is a wrong Makefile.Debug and MSys make print this error:

    /usr/bin/make -f Makefile.Debug
    make[1]: Entering directory `/c/DOCUME~1/user/testProject'
    Makefile.Debug:62: *** missing separator. Stop.
    make[1]: Leaving directory `/c/DOCUME~1/user/testProject'
    make: *** [debug] Error 2

    Anybody has this problem?
    Any idea?

    Thanks,
    Michele

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem

    1.) why do you need msys? I wouldn't use it asit just makes trouble when compiling qt
    2.) your call to qmake creates a makefile for msvc, not for mingw, add '-spec' option to qmake call and select the correct one for mingw.

  3. #3
    Join Date
    Oct 2008
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt 4.3.1 & MinGW 5.1.3 & MSYS 1.0 qmake problem

    So what should I put after "qmake -spec"?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.