Results 1 to 9 of 9

Thread: qmake and msys [win]

  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    84
    Thanks
    7
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default qmake and msys [win]

    hi,

    since i'm tired to build makefiles by myself i tried using qmake.
    my first step was writing a simple test program. i suppose qmake was
    designed to use it with the windows console (which is a pain i.t.a).
    running make/mingw32-make on msys i got problems with '/' and '\':

    make[1]: Entering directory `/c/01. - Arbeit/C++/treewidgettest'
    g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui"
    -I"C:/Qt/4.1.1/include" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.1/mkspecs/win32-g++" -o release\main.o main.cpp
    g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
    -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui" -I"C:/Qt/4.1.1/include" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"."
    -I"C:/Qt/4.1.1/mkspecs/win32-g++" -o release\TreeWidget.o TreeWidget.cpp

    C:\Qt\4.1.1\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL
    -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
    -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.1/include/QtCore" -I"C:/Qt/4.1.1/include/QtGui"
    -I"C:/Qt/4.1.1/include" -I"." -I"C:/Qt/4.1.1/include/ActiveQt" -I"release" -I"."
    -I"C:/Qt/4.1.1/mkspecs/win32-g++" -D__GNUC__ -DWIN32 TreeWidget.h -o
    release\moc_TreeWidget.cpp

    /bin/sh.exe: C:Qt4.1.1binmoc.exe: command not found
    make[1]: *** [release\moc_TreeWidget.cpp] Error 127
    make[1]: Leaving directory `/c/01. - Arbeit/C++/treewidgettest'
    make: *** [release] Error 2
    also some commands must be replaced, such as 'del' by 'rm' etc.

    how can i use a makefile generated by qmake on a msys console?

    best regards,
    jh
    Last edited by jacek; 16th June 2006 at 12:41. Reason: changed [ code ] to [ quote ] to allow wrapping of long lines

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and msys [win]

    Could the problem be that the path to moc is specified using \ instead of / that msys expects?

  3. #3
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and msys [win]

    1) If you want to keep msys you have to use Unix compatible makefiles. Try appending "-unix" or "-spec linux-g++" when calling qmake but be careful because it could bring some errors as well (I've not tried it...)

    2) Use the wi,ndows command line and everything will be Ok. If you're bored with the fact that the output can not be viewed entierely because there are no scrollbars then have a look redir, a tool which is part of mingw-utils and can redirect standard output and standard error to files...
    Current Qt projects : QCodeEdit, RotiDeCode

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    84
    Thanks
    7
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake and msys [win]

    Quote Originally Posted by e8johan
    Could the problem be that the path to moc is specified using \ instead of / that msys expects?
    unfortunately the problem occurs anytime there is a path specified.

    Qt Code:
    1. make -f Makefile.Release
    2. make[1]: Entering directory `/c/01. - Arbeit/C++/treewidgettest'
    3. g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
    4. -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows -o
    5. "release\treewidgettest.exe" release\main.o release\TreeWidget.o
    6. release\moc_TreeWidget.o -L"C:\Qt\4.1.1\lib" -lmingw32 -lqtmain -lQtGui4 -lQtCore4
    7. g++.exe: releasemoc_TreeWidget.o: No such file or directory
    8. make[1]: *** [release\treewidgettest.exe] Error 1
    9. make[1]: Leaving directory `/c/01. - Arbeit/C++/treewidgettest'
    10. make: *** [release] Error 2
    To copy to clipboard, switch view to plain text mode 


    jh

  5. #5
    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: qmake and msys [win]

    qmake does not work with msys - why should it need msys anyway?

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    84
    Thanks
    7
    Thanked 2 Times in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake and msys [win]

    not qmake need msys, I NEED IT !!


    best regards,
    jh

  7. #7
    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: qmake and msys [win]

    Ok, than the other way round - qmake does not support msys

  8. #8
    Join Date
    Feb 2006
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and msys [win]

    The problems is that you can't have sh.exe in your path:

    http://qtnode.net/wiki/MSYS_backslash_problems

  9. #9
    Join Date
    Nov 2008
    Posts
    33
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qmake and msys [win]

    Quote Originally Posted by fullmetalcoder View Post
    1) If you want to keep msys you have to use Unix compatible makefiles. Try appending "-unix" or "-spec linux-g++" when calling qmake but be careful because it could bring some errors as well (I've not tried it...)
    appending -unix does not solve the problem, since it generates rules like this one:

    debug/moc_lcdrange.cpp: lcdrange.h \
    c:/Qt/4.4.3/bin/moc.exe
    C:\Qt\4.4.3\bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 lcdrange.h -o debug/moc_lcdrange.cpp
    isn't this a bug? Because some path is generated OK for msys (line 2), while the command itself is generated wrong (line 3)

    Using -spec linux-g++ raises errors due to include paths not found...

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
  •  
Qt is a trademark of The Qt Company.